From e9f3137bd08b0746c96bed5e8e28e3f43d55757b Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Fri, 20 Oct 2023 07:59:57 +0200 Subject: [PATCH 1/5] updated --- input/fsh/examples.fsh | 13 +++++++++++++ input/fsh/profiles.fsh | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/input/fsh/examples.fsh b/input/fsh/examples.fsh index cd1205656..8ec1a794d 100644 --- a/input/fsh/examples.fsh +++ b/input/fsh/examples.fsh @@ -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 diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index 1e134e088..56644b8ed 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -1,8 +1,14 @@ +Invariant: Medical-Record-Number-Shall-Exist +Description: "If Patient.identifier[NID] exists, then Patient.identifier[MR] SHALL also exist" +Expression: "Patient.identifier[NID].exists() implies Patient.identifier[MR].exists()" +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" @@ -40,6 +46,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 From 367cc1ea5add9b3d12c0c3773331f2322efca29d Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Fri, 20 Oct 2023 08:15:14 +0200 Subject: [PATCH 2/5] Update profiles.fsh --- input/fsh/profiles.fsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index 56644b8ed..3fa494182 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -1,6 +1,6 @@ Invariant: Medical-Record-Number-Shall-Exist -Description: "If Patient.identifier[NID] exists, then Patient.identifier[MR] SHALL also exist" -Expression: "Patient.identifier[NID].exists() implies Patient.identifier[MR].exists()" +Description: "If Patient.identifier:NID exists, then Patient.identifier:MR SHALL also exist" +Expression: "Patient.identifier:NID.exists() implies Patient.identifier:MR.exists()" Severity: #error Profile: HIVPatient From c02812b3f2dce10f57f0016492ec29c1900c4ad9 Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Fri, 20 Oct 2023 08:21:39 +0200 Subject: [PATCH 3/5] Update profiles.fsh --- input/fsh/profiles.fsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index 3fa494182..98305b56d 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -1,6 +1,6 @@ Invariant: Medical-Record-Number-Shall-Exist Description: "If Patient.identifier:NID exists, then Patient.identifier:MR SHALL also exist" -Expression: "Patient.identifier:NID.exists() implies Patient.identifier:MR.exists()" +Expression: "Patient.identifier.exists(slice = NID) implies Patient.identifier.exists(slice = MR)" Severity: #error Profile: HIVPatient From c29872ae65ff7d692703050924022c398f884436 Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Fri, 20 Oct 2023 08:34:02 +0200 Subject: [PATCH 4/5] Update profiles.fsh --- input/fsh/profiles.fsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index 98305b56d..b02a904c4 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -1,6 +1,8 @@ Invariant: Medical-Record-Number-Shall-Exist Description: "If Patient.identifier:NID exists, then Patient.identifier:MR SHALL also exist" -Expression: "Patient.identifier.exists(slice = NID) implies Patient.identifier.exists(slice = MR)" +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 From 047599dca9e1fd64f3923da11a5751993ce8f51d Mon Sep 17 00:00:00 2001 From: rmrlangford Date: Fri, 20 Oct 2023 09:45:15 +0200 Subject: [PATCH 5/5] Update profiles.fsh --- input/fsh/profiles.fsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index b02a904c4..6d4441205 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -19,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"