Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions input/fsh/examples.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ Description: "Patient example"
* extension[KPS].valueCodeableConcept.coding.system = "http://snomed.info/sct"
* extension[KPS].valueCodeableConcept.coding.display = "Current drug user"


* extension[PN].extension[code].valueCodeableConcept.text = "Nationality"
* extension[PN].extension[code].valueCodeableConcept.coding.code = #ZA
* extension[PN].extension[code].valueCodeableConcept.coding.display = "South Africa"
* extension[PN].extension[code].valueCodeableConcept.coding.system = "urn:iso:std:iso:3166"
* extension[PN].extension[period].valuePeriod.start = "1983-05-22"

* extension[PC].extension[code].valueCodeableConcept.text = "Citizenship"
* extension[PC].extension[code].valueCodeableConcept.coding.code = #ZA
* extension[PC].extension[code].valueCodeableConcept.coding.display = "South Africa"
* extension[PC].extension[code].valueCodeableConcept.coding.system = "urn:iso:std:iso:3166"
* extension[PC].extension[period].valuePeriod.start = "1983-05-22"

Instance: TargetFacilityEncounterExample
InstanceOf: TargetFacilityEncounter
Usage: #example
Expand Down
16 changes: 13 additions & 3 deletions input/fsh/profiles.fsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Invariant: Medical-Record-Number-Shall-Exist
Description: "If Patient.identifier:NID exists, then Patient.identifier:MR SHALL also exist"
Expression:
"Patient.identifier.exists(system = 'http://openhie.org/fhir/training-solution-1/identifier/nid')
implies Patient.identifier.exists(system = 'http://openhie.org/fhir/training-solution-1/identifier/mr')"
Severity: #error

Profile: HIVPatient
Parent: Patient
Id: hiv-patient
Title: "Patient"
Description: "A patient resource for an HIV Patient"
* obeys Medical-Record-Number-Shall-Exist
* identifier 1..*
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
Expand All @@ -11,10 +19,10 @@ Description: "A patient resource for an HIV Patient"
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
NID 0..1 and
MR 1..1
* identifier[NID].value 0..1 MS
MR 0..1
* identifier[NID].value 1..1 MS
* identifier[NID].system = "http://openhie.org/fhir/training-solution-1/identifier/nid" (exactly)
* identifier[MR].value 1..1
* identifier[MR].value 1..1 MS
* identifier[MR].system = "http://openhie.org/fhir/training-solution-1/identifier/mr" (exactly)
* identifier[MR].type.coding.code = #MR
* identifier[MR].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
Expand All @@ -40,6 +48,8 @@ Description: "A patient resource for an HIV Patient"
* maritalStatus 1..1
* managingOrganization 1..1
* extension contains KeyPopulationStatus named KPS 1..1
* extension contains patient-nationality named PN 1..1
* extension contains patient-citizenship named PC 1..1

Extension: KeyPopulationStatus
Id: key-population-status
Expand Down
Loading