Skip to content

Instantly share code, notes, and snippets.

@ericprud
Last active July 1, 2022 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericprud/aab227b0d6880bb307c9a99feb52c72d to your computer and use it in GitHub Desktop.
Save ericprud/aab227b0d6880bb307c9a99feb52c72d to your computer and use it in GitHub Desktop.
shex validation manifest
---
- schemaLabel: clinical observation all refs
schemaURL: clinobsSchema.shex
dataLabel: with birthdate
dataURL: clinobsInstance.ttl
queryMapURL: clinobsQueryMap.txt
status: conformant
- schemaLabel: clinical observation inline
schema: |
PREFIX : <http://hl7.org/fhir/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
start = @<ObservationShape>
<ObservationShape> { # An Observation has:
:status ["preliminary" "final"]; # status in this value set
:subject @<PatientShape> # a subject matching <PatientShape>.
}
<PatientShape> { # A Patient has:
:name xsd:string*; # one or more names
:birthdate xsd:date? # and an optional birthdate.
}
dataLabel: with birthdate
data: |
PREFIX : <http://hl7.org/fhir/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<Obs1>
:status "final" ;
:subject <Patient2> .
<Patient2>
:name "Bob" ;
:birthdate "1999-12-31"^^xsd:date .
queryMap: |
{FOCUS :status _}@START,
<Patient2>@!<ObservationShape>
status: conformant
PREFIX : <http://hl7.org/fhir/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<Obs1>
:status "final" ;
:subject <Patient2> .
<Patient2>
:name "Bob" ;
:birthdate "1999-12-31"^^xsd:date .
{FOCUS :status _}@START,
<Patient2>@!<ObservationShape>
PREFIX : <http://hl7.org/fhir/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
start = @<ObservationShape>
<ObservationShape> { # An Observation has:
:status ["preliminary" "final"]; # status in this value set
:subject @<PatientShape> # a subject matching <PatientShape>.
}
<PatientShape> { # A Patient has:
:name xsd:string*; # one or more names
:birthdate xsd:date? # and an optional birthdate.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment