diff --git a/_gencontinuous.sh b/_gencontinuous.sh old mode 100644 new mode 100755 diff --git a/input/fsh/examples.fsh b/input/fsh/examples.fsh index e69de29..51bd824 100644 --- a/input/fsh/examples.fsh +++ b/input/fsh/examples.fsh @@ -0,0 +1,48 @@ +Instance: TestPatientExampleOne +InstanceOf: TestPatient +Usage: #example +Title: "Test Patient Example One" +Description: "Example using simple extensions" +* identifier[NID].value = "NID1234" +* identifier[NID].system = "http://openhie.org/fhir/zambia-training/identifier/nid" +* identifier[MR].value = "MRN1234-A" +* identifier[MR].system = "http://openhie.org/fhir/zambia-training/identifier/mr" +* contact[+].name.given[+] = "Moses" +* contact[=].name.given[+] = "John" +* contact[=].name.family = "Giji" +* contact[=].telecom[+].value = "0831234567" +* contact[=].telecom[=].system = #phone +* contact[=].telecom[+].value = "same@gmail.com" +* contact[=].telecom[=].system = #email +* telecom[+][PHOME].value = "083-123-4567" +* telecom[=][PHOME].system = #phone +* telecom[+][EMAIL].value = "same@gmail.com" +* telecom[=][EMAIL].system = #email +//* extension[HIVPOPSTATUS].valueCodeableConcept.coding.code = #472986005 +//* extension[HIVPOPSTATUS].valueCodeableConcept.coding.system = "http://openhie.org/fhir/zambia-training/CodeSystem/cs-key-population-status" +* extension[HIVPOPSTATUS].valueCodeableConcept = $SCT#472986005 +* extension[HIVPOPSTATUSDate].valueDateTime = "1983-05-22T16:40:17+02:00" + +Instance: TestPatientExampleTwo +InstanceOf: TestPatient +Usage: #example +Title: "Test Patient Example Two" +Description: "Example using a complex extension" +* identifier[NID].value = "NID1234" +* identifier[NID].system = "http://openhie.org/fhir/zambia-training/identifier/nid" +* identifier[MR].value = "MRN1234-A" +* identifier[MR].system = "http://openhie.org/fhir/zambia-training/identifier/mr" +* contact[+].name.given[+] = "Moses" +* contact[=].name.given[+] = "John" +* contact[=].name.family = "Giji" +* contact[=].telecom[+].value = "0831234567" +* contact[=].telecom[=].system = #phone +* contact[=].telecom[+].value = "same@gmail.com" +* contact[=].telecom[=].system = #email +* telecom[+][PHOME].value = "083-123-4567" +* telecom[=][PHOME].system = #phone +* telecom[+][EMAIL].value = "same@gmail.com" +* telecom[=][EMAIL].system = #email +* extension[HIVPOPSTATUSDate].valueDateTime = "1983-05-22T16:40:17+02:00" +* extension[COMPLEXHIVPopStatus].extension[HIVPOPSTATUS].valueCodeableConcept = $SCT#472986005 +* extension[COMPLEXHIVPopStatus].extension[HIVPOPSTATUSDate].valueDateTime = "1983-05-22T16:40:17+02:00" \ No newline at end of file diff --git a/input/fsh/extensions.fsh b/input/fsh/extensions.fsh new file mode 100644 index 0000000..670a7db --- /dev/null +++ b/input/fsh/extensions.fsh @@ -0,0 +1,33 @@ +Extension: HIVKeyPop +Id: hiv-key-pop +Title: "HIV Key Pop" +Description: "HIV Key Pop" +* value[x] only CodeableConcept +* value[x] 1.. +* valueCodeableConcept from VSKeyPopulationSatus (extensible) +* ^context[+].type = #element +* ^context[=].expression = "Patient" + +* ^context[+].type = #element +* ^context[=].expression = "Patient.extension" + +Extension: HIVPopStatusDate +Id: hiv-pop-status-date +Title: "HIV Key Pop Date" +Description: "HIV Key Pop Date" +* value[x] only dateTime +* value[x] 1.. +* ^context[+].type = #element +* ^context[=].expression = "Patient" + +* ^context[+].type = #element +* ^context[=].expression = "Patient.extension" + +Extension: HIVPopStatusComplex +Id: hiv-pop-status-complex +Title: "HIV Pop Status Complex" +Description: "HIV Pop Status Complex" +* extension contains HIVKeyPop named HIVPOPSTATUS 1..1 +* extension contains HIVPopStatusDate named HIVPOPSTATUSDate 1..1 +* ^context[+].type = #element +* ^context[=].expression = "Patient" \ No newline at end of file diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index 0bd8ee1..ca657c7 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -1,11 +1,53 @@ +Invariant: PATIENT-PHONE-1 +Description: "Only special characters (dash) and numbers are allowed. For example: 083-123-1234" +Expression: "$this.matches('[0-9]{1,3}-[0-9]{1,3}-[0-9]{4}')" +Severity: #error + Profile: TestPatient Parent: Patient Id: test-patient Title: "Test Patient" Description: "Test Patient" +* ^description = "must support phone and email" + +* identifier 1..* +* identifier ^slicing.discriminator.type = #value +* identifier ^slicing.discriminator.path = "system" +* identifier ^slicing.rules = #open +* identifier ^slicing.ordered = false +* identifier ^slicing.description = "Slice based on the type of identifier." +* identifier contains + NID 0..1 MS and + MR 1..1 +* identifier[NID].value 1..1 +* identifier[NID].system = "http://openhie.org/fhir/zambia-training/identifier/nid" +* identifier[NID] ^definition = "To capture a patient's National ID..." +* identifier[MR].value 1..1 +* identifier[MR].system = "http://openhie.org/fhir/zambia-training/identifier/mr" + * contact 0..* * contact.name 1..1 * contact.name.given 1..* * contact.name.family 1..1 * contact.telecom 0..* -* contact.telecom.system 1..1 \ No newline at end of file +* contact.telecom.system 1..1 + +* telecom 0..* +* telecom ^slicing.discriminator.type = #value +* telecom ^slicing.discriminator.path = "system" +* telecom ^slicing.rules = #open +* telecom ^slicing.ordered = false +* telecom ^slicing.description = "Slice based on the type of identifier." +* telecom contains + EMAIL 0..1 MS and + PHOME 0..1 MS +* telecom[EMAIL].value 1..1 +* telecom[EMAIL].system = #email +* telecom[EMAIL] ^definition = "To capture a patient's email address..." +* telecom[PHOME].value 1..1 + * obeys PATIENT-PHONE-1 +* telecom[PHOME].system = #phone +* telecom[PHOME] ^definition = "To capture a blah blah blah..." +* extension contains HIVKeyPop named HIVPOPSTATUS 0..1 +* extension contains HIVPopStatusDate named HIVPOPSTATUSDate 0..1 +* extension contains HIVPopStatusComplex named COMPLEXHIVPopStatus 0..1 \ No newline at end of file diff --git a/input/fsh/terminology.fsh b/input/fsh/terminology.fsh index e69de29..e95f150 100644 --- a/input/fsh/terminology.fsh +++ b/input/fsh/terminology.fsh @@ -0,0 +1,22 @@ +Alias: $SCT = http://snomed.info/sct + +CodeSystem: CSKeyPopulationStatus +Id: cs-key-population-status +Title: "Key Population Status" +Description: "A list of key population types" +* ^experimental = false +* ^caseSensitive = true +* #General-Population "General Population" + +ValueSet: VSKeyPopulationSatus +Id: vs-key-population-status +Title: "Key Population Status" +Description: "A list of key population types" +* ^experimental = false +* $SCT#472986005 "Sexually active with men" +* $SCT#159799000 "Female prostitute" +* $SCT#159800001 "Male prostitute" +* $SCT#228388006 "Intravenous drug user" +* $SCT#417284009 "Current drug user" +* $SCT#407375002 "Surgically transgendered transsexual" +* include codes from system CSKeyPopulationStatus \ No newline at end of file