Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rmrlangford committed Sep 24, 2024
1 parent 715cc74 commit 392db9f
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
Empty file modified _gencontinuous.sh
100644 → 100755
Empty file.
39 changes: 39 additions & 0 deletions input/fsh/examples.fsh
Original file line number Diff line number Diff line change
@@ -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"
48 changes: 48 additions & 0 deletions input/fsh/extension.fsh
Original file line number Diff line number Diff line change
@@ -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"
35 changes: 35 additions & 0 deletions input/fsh/profiles.fsh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 392db9f

Please sign in to comment.