|
|
@ -39,11 +39,6 @@ export type Element = |
|
|
|
"@id": "CreativeWork"; |
|
|
|
"@id": "CreativeWork"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// No need to fully define the schema because this library doesn't use it
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
|
|
|
export const patientSchema: Schema = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const patientContext: LdoJsonldContext = { |
|
|
|
export const patientContext: LdoJsonldContext = { |
|
|
|
Bender: { |
|
|
|
Bender: { |
|
|
|
"@id": "https://example.com/Bender", |
|
|
|
"@id": "https://example.com/Bender", |
|
|
@ -56,46 +51,37 @@ export const patientContext: LdoJsonldContext = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
friend: { |
|
|
|
friend: { |
|
|
|
"@id": "https://example.com/friend", |
|
|
|
"@id": "https://example.com/friend", |
|
|
|
} |
|
|
|
"@isCollection": true, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
Avatar: { |
|
|
|
Patient: "http://hl7.org/fhir/Patient", |
|
|
|
"@id": "https://example.com/Bender", |
|
|
|
subject: { "@id": "http://hl7.org/fhir/subject", "@type": "@id" }, |
|
|
|
"@context": { |
|
|
|
name: { |
|
|
|
type: { |
|
|
|
"@id": "http://hl7.org/fhir/name", |
|
|
|
"@id": "@type", |
|
|
|
"@type": "http://www.w3.org/2001/XMLSchema#string", |
|
|
|
}, |
|
|
|
"@container": "@set", |
|
|
|
element: { |
|
|
|
}, |
|
|
|
"@id": "https://example.com/element", |
|
|
|
langName: { |
|
|
|
"@isCollection": true, |
|
|
|
"@id": "http://hl7.org/fhir/langName", |
|
|
|
}, |
|
|
|
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", |
|
|
|
friend: { |
|
|
|
"@container": "@set", |
|
|
|
"@id": "https://example.com/friend", |
|
|
|
}, |
|
|
|
"@isCollection": true, |
|
|
|
birthdate: { |
|
|
|
}, |
|
|
|
"@id": "http://hl7.org/fhir/birthdate", |
|
|
|
}, |
|
|
|
"@type": "http://www.w3.org/2001/XMLSchema#date", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
age: { |
|
|
|
|
|
|
|
"@id": "http://hl7.org/fhir/age", |
|
|
|
|
|
|
|
"@type": "http://www.w3.org/2001/XMLSchema#integer", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
isHappy: { |
|
|
|
|
|
|
|
"@id": "http://hl7.org/fhir/isHappy", |
|
|
|
|
|
|
|
"@type": "http://www.w3.org/2001/XMLSchema#boolean", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
roommate: { |
|
|
|
|
|
|
|
"@id": "http://hl7.org/fhir/roommate", |
|
|
|
|
|
|
|
"@type": "@id", |
|
|
|
|
|
|
|
"@container": "@set", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
notes: { |
|
|
|
|
|
|
|
"@id": "http://hl7.org/fhir/notes", |
|
|
|
|
|
|
|
"@type": "http://www.w3.org/2001/XMLSchema#string", |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
langNotes: { |
|
|
|
NonBender: { |
|
|
|
"@id": "http://hl7.org/fhir/langNotes", |
|
|
|
"@id": "https://example.com/NonBender", |
|
|
|
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", |
|
|
|
"@context": { |
|
|
|
|
|
|
|
type: { |
|
|
|
|
|
|
|
"@id": "@type", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
friend: { |
|
|
|
|
|
|
|
"@id": "https://example.com/friend", |
|
|
|
|
|
|
|
"@isCollection": true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -105,32 +91,17 @@ export const patientData = ` |
|
|
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
|
|
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
|
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
|
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
|
|
|
|
|
|
|
|
|
|
|
example:Observation1 |
|
|
|
example:Aang a example:Avatar |
|
|
|
fhir:notes "Cool Notes"^^xsd:string ; |
|
|
|
example:element example:Air, example:Water ; |
|
|
|
fhir:subject example:Patient1 . |
|
|
|
example:friend example:Sokka, example:Katara . |
|
|
|
|
|
|
|
|
|
|
|
example:Patient1 |
|
|
|
example:Katara a example:Avatar |
|
|
|
rdf:type fhir:Patient ;
|
|
|
|
example:element example:Water ; |
|
|
|
fhir:name "Garrett"^^xsd:string, "Bobby"^^xsd:string, "Ferguson"^^xsd:string ; |
|
|
|
example:friend example:Sokka, example:Aang . |
|
|
|
fhir:birthdate "1986-01-01"^^xsd:date ; |
|
|
|
|
|
|
|
fhir:age "35"^^xsd:integer ; |
|
|
|
|
|
|
|
fhir:isHappy "true"^^xsd:boolean ; |
|
|
|
|
|
|
|
fhir:roommate example:Patient2, example:Patient3 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
example:Patient2 |
|
|
|
example:Sokka a example:Avatar |
|
|
|
rdf:type fhir:Patient ;
|
|
|
|
example:element example:Water ; |
|
|
|
fhir:name "Rob"^^xsd:string ; |
|
|
|
example:friend example:Sokka, example:Aang . |
|
|
|
fhir:birthdate "1987-01-01"^^xsd:date ; |
|
|
|
|
|
|
|
fhir:age "34"^^xsd:integer ; |
|
|
|
|
|
|
|
fhir:isHappy "false"^^xsd:boolean ; |
|
|
|
|
|
|
|
fhir:roommate example:Patient1, example:Patient3 . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
example:Patient3 |
|
|
|
|
|
|
|
rdf:type fhir:Patient ;
|
|
|
|
|
|
|
|
fhir:name "Amy"^^xsd:string ; |
|
|
|
|
|
|
|
fhir:birthdate "1988-01-01"^^xsd:date ; |
|
|
|
|
|
|
|
fhir:age "33"^^xsd:integer ; |
|
|
|
|
|
|
|
fhir:isHappy "true"^^xsd:boolean . |
|
|
|
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
export const patientDataWithBlankNodes = ` |
|
|
|
export const patientDataWithBlankNodes = ` |
|
|
|