@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

[a fhir:Https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:name [ fhir:v "Death"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:description [ fhir:v "Vue se rapprochant de la table OMOP death"] ; # 
  fhir:resource [ fhir:v "Patient"] ; # 
  fhir:select ( [
     fhir:column ( [
       fhir:path [ fhir:v "id" ] ;
       fhir:name [ fhir:v "person_id" ]
     ] [
       fhir:path [ fhir:v "deceased.ofType(dateTime)" ] ;
       fhir:name [ fhir:v "death_date" ]
     ] [
       fhir:path [ fhir:v "deceased.ofType(dateTime)" ] ;
       fhir:name [ fhir:v "death_datetime" ]
     ] [
       fhir:path [ fhir:v "32817" ] ;
       fhir:name [ fhir:v "death_type_concept_id" ]
     ] )
  ] ) ; # 
  fhir:where ( [
     fhir:path [ fhir:v "deceased.ofType(dateTime).exists()" ]
  ] )] . # 

# -------------------------------------------------------------------------------------

