From 392db9f841a9c408b8cd98988b3f29c08b447871 Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Tue, 24 Sep 2024 08:35:16 +0200 Subject: [PATCH] updated --- _gencontinuous.sh | 0 input/fsh/examples.fsh | 39 +++++++++++++++++++++++++++++++++ input/fsh/extension.fsh | 48 +++++++++++++++++++++++++++++++++++++++++ input/fsh/profiles.fsh | 35 ++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+) mode change 100644 => 100755 _gencontinuous.sh create mode 100644 input/fsh/extension.fsh 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..74ddb50 100644 --- a/input/fsh/examples.fsh +++ b/input/fsh/examples.fsh @@ -0,0 +1,39 @@ +Instance: PatientExample1 +InstanceOf: TestPatient +Usage: #example +Title: "Patient - Marital Status Captured" +Description: "Patient documented as married." +* name[+].given[+] = "John" +* name[=].given[+] = "Doe" +* maritalStatus = http://terminology.hl7.org/CodeSystem/v3-MaritalStatus#M +* maritalStatus.extension[MaritalStatusDate].valueDate = "1999-01-01" + +Instance: PatientExample2 +InstanceOf: TestPatient +Usage: #example +Title: "Patient - Marital Status Not Captured" +Description: "Patient marital status not documented." +* name[+].given[+] = "John" +* name[=].given[+] = "Doe" + +Instance: PatientExample3 +InstanceOf: TestPatient +Usage: #example +Title: "Patient - Marital Status Not Captured (Incl. Relation)" +Description: "Patient marital status not documented but includes a Mother relationship." +* name[+].given[+] = "John" +* name[=].given[+] = "Doe" +* link[+].type = #seealso +* link[=].other = Reference(MotherRelatedPerson) + +Instance: MotherRelatedPerson +InstanceOf: TestPatientRelation +Usage: #example +Title: "Related Person - Mother" +Description: "Patient marital status not documented but includes a Mother relationship." +* name[+].given[+] = "Jane" +* name[=].given[+] = "Smith" +* patient = Reference(PatientExample3) +* relationship = http://terminology.hl7.org/CodeSystem/v3-RoleCode#MTH +* extension[MaritalStatusAndEffectiveDate][+].extension[MaritalStatus].valueCodeableConcept = http://terminology.hl7.org/CodeSystem/v3-MaritalStatus#D +* extension[MaritalStatusAndEffectiveDate][=].extension[MaritalStatusDate].valueDate = "1999-01-01" \ No newline at end of file diff --git a/input/fsh/extension.fsh b/input/fsh/extension.fsh new file mode 100644 index 0000000..707b350 --- /dev/null +++ b/input/fsh/extension.fsh @@ -0,0 +1,48 @@ +Extension: MaritalStatusDateExtension +Id: marital-status-date +Title: "Patient Marital Status Date" +Description: " + An extension to capture the date for when the marital status came into effect. + + Note: This is for demonstrable purposes only!" + +* ^experimental = true +* ^status = #draft +* value[x] only date +* valueDate 1..1 +* ^context[+].type = #element +* ^context[=].expression = "Patient.maritalStatus" +* ^context[+].type = #element +* ^context[=].expression = "RelatedPerson.extension" + +Extension: MaritalStatusAndEffectiveDateExtension +Id: marital-status-and-effective-date +Title: "Patient Marital Status and Effective Date" +Description: " + An extension to capture the marital status and the effective date for when the marital status came into effect. + + Note: This is for demonstrable purposes only!" + +* ^experimental = true +* ^status = #draft +* . SU // to ensure that both extensions are included in GET requests. +* extension contains MaritalStatusExtension named MaritalStatus 1..1 +* extension contains MaritalStatusDateExtension named MaritalStatusDate 1..1 +* ^context[+].type = #element +* ^context[=].expression = "RelatedPerson" + +Extension: MaritalStatusExtension +Id: marital-status +Title: "Patient Marital Status" +Description: " + An extension to capture the marital status. + + Note: This is for demonstrable purposes only!" + +* ^experimental = true +* ^status = #draft +* value[x] only CodeableConcept +* valueCodeableConcept from http://hl7.org/fhir/ValueSet/marital-status (extensible) +* valueCodeableConcept 1..1 +* ^context[+].type = #element +* ^context[=].expression = "RelatedPerson.extension" \ No newline at end of file diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index e69de29..0121567 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -0,0 +1,35 @@ +Profile: TestPatient +Parent: Patient +Id: test-patient +Title: "Patient" +Description: " + Test Patient. + + Note: This is for demonstrable purposes only!" + +* ^experimental = true +* ^status = #draft +* name 1..* +* name.given 1..2 +* maritalStatus 0..1 MS + * SU // to ensure that the ALL data elements (incl. the below extension) within maritalStatus are included in GET requests. + * extension contains MaritalStatusDateExtension named MaritalStatusDate 1..1 + +* link 0..* MS +* link.other only Reference(TestPatientRelation) + +Profile: TestPatientRelation +Parent: RelatedPerson +Id: test-patient-relationship +Title: "Related Person" +Description: " + Patient Relation. + + Note: This is for demonstrable purposes only!" + +* ^experimental = true +* ^status = #draft +* name 1..* +* name.given 1..* +* relationship 1..1 +* extension contains MaritalStatusAndEffectiveDateExtension named MaritalStatusAndEffectiveDate 0..* MS \ No newline at end of file