Skip to content

Commit

Permalink
Added in conversion of register client data dictionary with code syst…
Browse files Browse the repository at this point in the history
…em, valuesets, logical model, questionnaire, and profiles. Still need to copy over and update structuremap.
  • Loading branch information
lukeaduncan committed Dec 13, 2024
1 parent ed2cdea commit da369d8
Show file tree
Hide file tree
Showing 20 changed files with 643 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ bundles
**/tests-*-bundle.json
node_modules/
outputs/*
node_modules
2 changes: 2 additions & 0 deletions _gencontinuous.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
CALL ./_genonce.bat -watch
2 changes: 2 additions & 0 deletions _gencontinuous.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
./_genonce.sh -watch
Empty file modified _genonce.sh
100644 → 100755
Empty file.
Empty file modified _updatePublisher.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion ig.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[IG]
ig = fsh-generated/resources/ImplementationGuide-who.fhir.smart-immuniztions.json
ig = fsh-generated/resources/ImplementationGuide-smart.who.int.immunizations.json

#template = #local-template
template = who.template.root#current
26 changes: 26 additions & 0 deletions input/fsh/codesystems/IMMZ.C.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CodeSystem: IMMZ.C
Title: "IMMZ.C CodeSystem for Data Elements"
Description: "CodeSystem for IMMZ.C Data Elements"

* ^experimental = false
* ^caseSensitive = false
* ^name = "IMMZ_C"
* ^status = #active

* #DE1 "Unique identifier" "Unique identifier for the client, according to the policies applicable to each country. There can be more than one unique identifier used to link records (e.g. national identification [ID], health ID, immunization information system ID, medical record ID)"
* #DE2 "Name" "The full name of the client"
* #DE3 "First name" "Client's first name or given name"
* #DE4 "Family name" "Client's family name or last name"
* #DE5 "Sex" "Documentation of a specific instance of sex information for the client"
* #DE6 "Male" "Client's biological sex is male"
* #DE7 "Female" "Client's biological sex is female"
* #DE8 "Biological sex not specified" "Client's biological sex is not specified"
* #DE9 "Intersex " "Client's biological sex is intersex"
* #DE10 "Date of birth " "Client's date of birth (DOB) if known; if unknown, use assigned DOB for administrative purposes"
* #DE13 "Age" "The client's calculated age (presented as number of years, months, weeks, days) based on the DOB and the visit date"
* #DE14 "Caregivers (multiple)" "Details of the client's caregiver (person) who could be next of kin (e.g. partner, husband, mother, sibling, etc.)"
* #DE15 "Caregiver's full name" "The full name of the client's caregiver"
* #DE16 "Caregiver's first name" "First or given name of the client's caregiver"
* #DE17 "Caregiver's family name" "Family name or last name of the client's caregiver"
* #DE18 "Contact phone number" "Client's phone number; can be a landline or a mobile phone number"
* #DE19 "Address" "Client's home address or address that the client is consenting to disclose"
101 changes: 101 additions & 0 deletions input/fsh/conceptmaps/IMMZ.C.ConceptMap.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Instance: IMMZ.C.ConceptMap
InstanceOf: ConceptMap
Description: "Mapping to and from IMMZ.C Data Dictionary to other codesystems."
Usage: #definition

* name = "IMMZ_C_ConceptMap"
* title = "ConceptMap to and from IMMZ.C DataElements"
* status = #active
* experimental = false
* date = "2024-01-19"

* group[+]
* source = Canonical(IMMZ.C)
* target = $GENDER
* insert ElementMap(DE6, male, equivalent)
* insert ElementMap(DE7, female, equivalent)
* insert ElementMap(DE8, unknown, equivalent)
* insert ElementMap(DE9, other, wider)
* group[+]
* source = $GENDER
* target = Canonical(IMMZ.C)
* insert ElementMap(male, DE6, equivalent)
* insert ElementMap(female, DE7, equivalent)
* insert ElementMap(unknown, DE8, equivalent)
* insert ElementMap(other, DE9, narrower)

* group[+]
* source = Canonical(IMMZ.C)
* target = $ICD11
* insert ElementMap(DE6, XX2UQ8, equivalent)
* insert ElementMap(DE7, XX2V25, equivalent)
* insert ElementMap(DE8, XX2PX3, equivalent)
* insert ElementMap(DE9, XX45B7, equivalent)
* group[+]
* source = $ICD11
* target = Canonical(IMMZ.C)
* insert ElementMap(XX2UQ8, DE6, equivalent)
* insert ElementMap(XX2V25, DE7, equivalent)
* insert ElementMap(XX2PX3, DE8, equivalent)
* insert ElementMap(XX45B7, DE9, equivalent)

* group[+]
* source = Canonical(IMMZ.C)
* target = $LNC
* insert ElementMap(DE2, 54125-0, equivalent)
* insert ElementMap(DE3, 45392-8, equivalent)
* insert ElementMap(DE4, 45394-4, equivalent)
* insert ElementMap(DE5, 46098-0, equivalent)
* insert ElementMap(DE10, 21112-8, equivalent)
* insert ElementMap(DE13, 63900-5, wider)
* insert ElementMap(DE16, 45392-8, wider)
* insert ElementMap(DE17, 45394-4, wider)
* insert ElementMap(DE18, 42077-8, equivalent)
* insert ElementMap(DE19, 56799-0, narrower)
* group[+]
* source = $LNC
* target = Canonical(IMMZ.C)
* insert ElementMap(54125-0, DE2, equivalent)
* insert ElementMap(45392-8, DE3, equivalent)
* insert ElementMap(45394-4, DE4, equivalent)
* insert ElementMap(46098-0, DE5, equivalent)
* insert ElementMap(21112-8, DE10, equivalent)
* insert ElementMap(63900-5, DE13, narrower)
* insert ElementMap(45392-8, DE16, narrower)
* insert ElementMap(45394-4, DE17, narrower)
* insert ElementMap(42077-8, DE18, equivalent)
* insert ElementMap(56799-0, DE19, wider)

* group[+]
* source = Canonical(IMMZ.C)
* target = $SCT
* insert ElementMap(DE2, 371484003, equivalent)
* insert ElementMap(DE3, 184095009, relatedto)
* insert ElementMap(DE4, 184096005, relatedto)
* insert ElementMap(DE5, 184100006, equivalent)
* insert ElementMap(DE6, 248153007, equivalent)
* insert ElementMap(DE7, 248152002, equivalent)
* insert ElementMap(DE8, 772004004, relatedto)
* insert ElementMap(DE9, 15867007, equivalent)
* insert ElementMap(DE10, 184099003, equivalent)
* insert ElementMap(DE14, 184140000, wider)
* insert ElementMap(DE15, 184140000, wider)
* insert ElementMap(DE18, 184103008, equivalent)
* insert ElementMap(DE19, 184097001, narrower)
* group[+]
* source = $SCT
* target = Canonical(IMMZ.C)
* insert ElementMap(371484003, DE2, equivalent)
* insert ElementMap(184095009, DE3, relatedto)
* insert ElementMap(184096005, DE4, relatedto)
* insert ElementMap(184100006, DE5, equivalent)
* insert ElementMap(248153007, DE6, equivalent)
* insert ElementMap(248152002, DE7, equivalent)
* insert ElementMap(772004004, DE8, relatedto)
* insert ElementMap(15867007, DE9, equivalent)
* insert ElementMap(184099003, DE10, equivalent)
* insert ElementMap(184140000, DE14, narrower)
* insert ElementMap(184140000, DE15, narrower)
* insert ElementMap(184103008, DE18, equivalent)
* insert ElementMap(184097001, DE19, wider)

9 changes: 9 additions & 0 deletions input/fsh/examples/IMMZ.C.Caregiver.1.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Instance: IMMZ.C.Caregiver.1
InstanceOf: IMMZCaregiver
Usage: #example

* name[+]
* text = "Zanele Mbeki"
* family = "Mbeki"
* given[+] = "Zanele"
* patient = Reference(IMMZ.C.Patient.1)
16 changes: 16 additions & 0 deletions input/fsh/examples/IMMZ.C.Patient.1.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Instance: IMMZ.C.Patient.1
InstanceOf: IMMZPatient
Usage: #example

* identifier.value = "12345-ZA"
* name[immzName]
* text = "Thabo Mbulelo Mbeki"
* family = "Mbeki"
* given[+] = "Thabo"
* given[+] = "Mbulelo"
* gender = #male
* birthDate = "1942-06-18"
* address.text = "123 Main Street, Cape Town, Western Cape, 8001, ZA"
* telecom[immzPhone]
* system = #phone
* value = "+27 21 465 8000"
45 changes: 45 additions & 0 deletions input/fsh/examples/IMMZ.C.QuestionnaireResponse.1.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Instance: Example.IMMZ.C.QuestionnaireResponse.1
InstanceOf: QuestionnaireResponse
Usage: #example
* status = #completed
* authored = "2024-12-13T19:20:20.913Z"
* questionnaire = Canonical(QIMMZCClientregistration)
* item[+]
* linkId = "uniqueIdentifier"
* answer.valueString = "12345-ZA"
* item[+]
* linkId = "name"
* answer.valueString = "Thabo Mbulelo Mbeki"
* item[+]
* linkId = "firstName"
* answer.valueString = "Thabo Mbulelo"
* item[+]
* linkId = "familyName"
* answer.valueString = "Mbeki"
* item[+]
* linkId = "sex"
* answer.valueCoding = IMMZ.C#DE6 "Male"
* item[+]
* linkId = "dateOfBirth"
* answer.valueDate = "1942-06-18"
* item[+]
* linkId = "age"
* answer.valueInteger = 82
* item[+]
* linkId = "caregiversMultiple"
* item[+]
* linkId = "caregiversFullName"
* answer.valueString = "Zanele Mbeki"
* item[+]
* linkId = "caregiversFirstName"
* answer.valueString = "Zanele"
* item[+]
* linkId = "caregiversFamilyName"
* answer.valueString = "Mbeki"
* item[+]
* linkId = "contactPhoneNumber"
* answer.valueString = "+27 21 465 8000"
* item[+]
* linkId = "address"
* answer.valueString = "123 Main Street, Cape Town, Western Cape, 8001, ZA"

69 changes: 69 additions & 0 deletions input/fsh/models/IMMZCClientregistration.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Invariant: IMMZ-C-name-1
Description: "Only letters and special characters (period, dash) allowed."
Expression: "$this.matches('[A-Za-z-.]*')"
Severity: #error

Invariant: IMMZ-C-age-1
Description: "Required if date of birth is entered."
Expression: "not(%resource.dateOfBirth.exists()) or $this.exists()"
Severity: #error

Logical: IMMZCClientregistration
Title: "IMMZ.C Client registration"
Description: "Data elements for the IMMZ.C Client registration Data Dictionary."

* ^name = "IMMZ_C_Client_registration"
* ^status = #active
* uniqueIdentifier 1..1 string "Unique identifier" "Unique identifier for the client, according to the policies applicable to each country. There can be more than one unique identifier used to link records (e.g. national identification [ID], health ID, immunization information system ID, medical record ID)"
* ^code[+] = IMMZ.C#DE1
* name 1..1 string "Name" "The full name of the client"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE2
* ^code[+] = $LNC#54125-0 "Patient name"
* ^code[+] = $SCT#371484003 "Patient name (observable entity)"
* firstName 0..1 string "First name" "Client's first name or given name"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE3
* ^code[+] = $LNC#45392-8 "First name"
* ^code[+] = $SCT#184095009 "Patient forename (observable entity)"
* familyName 0..1 string "Family name" "Client's family name or last name"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE4
* ^code[+] = $LNC#45394-4 "Last name"
* ^code[+] = $SCT#184096005 "Patient surname (observable entity)"
* sex 1..1 code "Sex" "Documentation of a specific instance of sex information for the client"
* sex from IMMZ.C.DE5 (required)
* ^code[+] = IMMZ.C#DE5
* ^code[+] = $LNC#46098-0 "Sex"
* ^code[+] = $SCT#184100006 "Patient sex (observable entity)"
* dateOfBirth 1..1 string "Date of birth " "Client's date of birth (DOB) if known; if unknown, use assigned DOB for administrative purposes"
* ^code[+] = IMMZ.C#DE10
* ^code[+] = $LNC#21112-8 "Birth date"
* ^code[+] = $SCT#184099003 "Date of birth (observable entity)"
* age 0..1 string "Age" "The client's calculated age (presented as number of years, months, weeks, days) based on the DOB and the visit date"
* obeys IMMZ-C-age-1
* ^code[+] = IMMZ.C#DE13
* ^code[+] = $LNC#63900-5 "Current age or age at death"
* caregiversMultiple 0..* BackboneElement "Caregivers (multiple)" "Details of the client's caregiver (person) who could be next of kin (e.g. partner, husband, mother, sibling, etc.)"
* ^code[+] = IMMZ.C#DE14
* ^code[+] = $SCT#184140000 "Caregiver details (observable entity)"
* caregiversFullName 0..1 string "Caregiver's full name" "The full name of the client's caregiver"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE15
* ^code[+] = $SCT#184140000 "Caregiver details (observable entity)"
* caregiversFirstName 0..1 string "Caregiver's first name" "First or given name of the client's caregiver"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE16
* ^code[+] = $LNC#45392-8 "First name"
* caregiversFamilyName 0..1 string "Caregiver's family name" "Family name or last name of the client's caregiver"
* obeys IMMZ-C-name-1
* ^code[+] = IMMZ.C#DE17
* ^code[+] = $LNC#45394-4 "Last name"
* contactPhoneNumber 1..1 string "Contact phone number" "Client's phone number; can be a landline or a mobile phone number"
* ^code[+] = IMMZ.C#DE18
* ^code[+] = $LNC#42077-8 "Patient Phone number"
* ^code[+] = $SCT#184103008 "Patient telephone number (observable entity)"
* address 1..1 string "Address" "Client's home address or address that the client is consenting to disclose"
* ^code[+] = IMMZ.C#DE19
* ^code[+] = $LNC#56799-0 "Address"
* ^code[+] = $SCT#184097001 "Patient address (observable entity)"
30 changes: 30 additions & 0 deletions input/fsh/profiles/IMMZPatient.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Profile: IMMZPatient
Parent: Patient
Id: IMMZ.Patient
Title: "SMART Guidelines Immunizations Patient"
Description: "Patient Profile for the Immunizations SMART Guidelines. From IMMZ.C Client Registration for IMMZ.C4.Create client record OR IMMZ.C5.3.Update client details."

* identifier 1..*
* identifier.value 1..1

* name ^slicing.discriminator.type = #exists
* name ^slicing.discriminator.path = "text"
* name ^slicing.rules = #open
* name contains immzName 1..*

* name[immzName].text 1..1
* name[immzName].family MS
* name[immzName].given MS

* gender 1..1
* birthDate 1..1
* address 1..1

* telecom ^slicing.discriminator.type = #value
* telecom ^slicing.discriminator.path = "system"
* telecom ^slicing.rules = #open
* telecom contains immzPhone 1..*

* telecom[immzPhone].system 1..1
* telecom[immzPhone].system = #phone
* telecom[immzPhone].value 1..1
16 changes: 16 additions & 0 deletions input/fsh/profiles/IMMZRelatedPerson.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Profile: IMMZCaregiver
Parent: RelatedPerson
Id: IMMZ.Caregiver
Title: "SMART Guidelines Immunizations Caregiver (RelatedPerson)"
Description: "Caregiver (RelatedPerson) Profile for the Immunizations SMART Guidelines. From IMMZ.C Client Registration for IMMZ.C4.Create client record OR IMMZ.C5.3.Update client details."


* relationship 1..1
* relationship = http://terminology.hl7.org/5.1.0/CodeSystem-v3-RoleClass.html#CAREGIVER

* patient only Reference(IMMZPatient)

* name 1..*
* name.text 1..1
* name.family MS
* name.given MS
Loading

0 comments on commit da369d8

Please sign in to comment.