Skip to content

Commit

Permalink
Merge pull request #1 from jembi/smartcare-initial
Browse files Browse the repository at this point in the history
Smartcare initial
  • Loading branch information
rmrlangford authored Jan 31, 2024
2 parents adf33ac + 16c2141 commit 81e6335
Show file tree
Hide file tree
Showing 26 changed files with 331 additions and 31 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This is an empty IG
### Publication
This ImplementationGuide is published in the following locations:

Continuous Build: __http://build.fhir.org/ig/openhie/fhir-ig-empty/branches/main/index.html__
Canonical / permanent URL:
Continuous Build: __http://build.fhir.org/ig/jembi/Zambia-Immunizations/branches/main/index.html__
Canonical / permanent URL: __https://jembi.github.io/Zambia-Immunizations/index.html__
<br> </br>

### Issues
Issues and change requests are managed here:

Issues: __https://github.com/openhie/fhir-ig-empty/issues__
Kanban board: __https://github.com/openhie/fhir-ig-empty/projects/1__
Issues: __https://github.com/jembi/Zambia-Immunizations/issues__
Kanban board: __https://github.com/jembi/Zambia-Immunizations/projects/1__

---
2 changes: 2 additions & 0 deletions _genonce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fi

echo "$txoption"

export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8"

publisher=$input_cache_path/$publisher_jar
if test -f "$publisher"; then
java -jar $publisher -ig . $txoption $*
Expand Down
2 changes: 1 addition & 1 deletion _updatePublisher.bat
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@ start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updat

IF "%skipPrompts%"=="true" (
PAUSE
}
)
9 changes: 4 additions & 5 deletions _updatePublisher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ while [ "$#" -gt 0 ]; do
done

echo "Checking internet connection"
case "$OSTYPE" in
linux-gnu* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;;
darwin* ) ping tx.fhir.org -c 1 >/dev/null ;;
*) echo "unknown: $OSTYPE"; exit 1 ;;
esac
curl -sSf tx.fhir.org > /dev/null

if [ $? -ne 0 ] ; then
echo "Offline (or the terminology server is down), unable to update. Exiting"
Expand Down Expand Up @@ -121,13 +117,16 @@ if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then

curl -L $gencont_sh_url -o /tmp/_gencontinuous.new
cp /tmp/_gencontinuous.new _gencontinuous.sh
chmod +x _gencontinuous.sh
rm /tmp/_gencontinuous.new

curl -L $gen_sh_url -o /tmp/_genonce.new
cp /tmp/_genonce.new _genonce.sh
chmod +x _genonce.sh
rm /tmp/_genonce.new

curl -L $update_sh_url -o /tmp/_updatePublisher.new
cp /tmp/_updatePublisher.new _updatePublisher.sh
chmod +x _updatePublisher.sh
rm /tmp/_updatePublisher.new
fi
6 changes: 3 additions & 3 deletions ig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# ini file for the Implementation Guide publisher
# see comments below for instructions

ig = fsh-generated/resources/ImplementationGuide-my-ig.json
#template = openhie.fhir.template#current
template = #local-template
ig = fsh-generated/resources/ImplementationGuide-openhie.fhir.zambia-immunizations.json
template = openhie.fhir.template#current
#template = #local-template



Expand Down
63 changes: 63 additions & 0 deletions input/fsh/conceptmaps/client-registration.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Instance: AdministrativeSexToAdministrativeGender
InstanceOf: ConceptMap
Title: "Administrative Sex To Administrative Gender"
Description: "Mapping to and from FHIR Administrative Sex coding to FHIR Administrative Gender."
Usage: #definition

* name = "AdministrativeSexToAdministrativeGender"
* description = "Mapping to and from FHIR Administrative Sex coding to FHIR Administrative Gender."
* title = "ConceptMap to and From administrative sex to administrative gender"
* status = #active
* experimental = false
* date = "2024-01-30"

* group[+]
* source = $SEX
* target = $GENDER
* insert ElementMap(M, male, equivalent)
* insert ElementMap(F, female, equivalent)

* group[+]
* source = $GENDER
* target = $SEX
* insert ElementMap(male, M, equivalent)
* insert ElementMap(female, F, equivalent)

Instance: PropietaryEducationLevelToLOINCEducationLevel
InstanceOf: ConceptMap
Title: "Propietary Education Level to LOINC Education Level"
Description: "Mapping to and from Propietary Education Level to LOINC Education Level."
Usage: #definition

* name = "PropietaryEducationLevelToLOINCEducationLevel"
* description = "Mapping to and from Propietary Education Level to LOINC Education Level."
* title = "ConceptMap to and From propietary education level to LOINC education Level"
* status = #active
* experimental = false
* date = "2024-01-31"

* group[+]
* source = $PROPRIETARY_EDU_LEVEL
* target = $LNC
* insert ElementMap(CertificateGraduate, LA30193-9, equivalent)
* insert ElementMap(DegreeGraduate, LA42-7, equivalent)
* insert ElementMap(DiplomaGraduate, LA32469-1, equivalent)
* insert ElementMap(JuniorSecondary, LA36-9, equivalent)
* insert ElementMap(MastersGraduate, LA12461-2, equivalent)
* insert ElementMap(NoFormalEducation, LA35-1, equivalent)
* insert ElementMap(PhDGraduate, LA30185-5, equivalent)
* insert ElementMap(Primary, LA32466-7, equivalent)
* insert ElementMap(SeniorSecondary, LA37-7, equivalent)

* group[+]
* source = $LNC
* target = $PROPRIETARY_EDU_LEVEL
* insert ElementMap(LA30193-9, CertificateGraduate, equivalent)
* insert ElementMap(LA42-7, DegreeGraduate, equivalent)
* insert ElementMap(LA32469-1, DiplomaGraduate, equivalent)
* insert ElementMap(LA36-9, JuniorSecondary, equivalent)
* insert ElementMap(LA12461-2, MastersGraduate, equivalent)
* insert ElementMap(LA35-1, NoFormalEducation, equivalent)
* insert ElementMap(LA30185-5, PhDGraduate, equivalent)
* insert ElementMap(LA32466-7, Primary, equivalent)
* insert ElementMap(LA37-7, SeniorSecondary, equivalent)
20 changes: 20 additions & 0 deletions input/fsh/examples.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Instance: HImmunizationPatientExample
InstanceOf: ImmunizationPatient
Usage: #example
Title: "Immunization Patient"
Description: "Is used to document demographics and other administrative information about an individual receiving care or other health-related services."
* identifier[NUPIN][+].value = "12-999-22-2338"
* identifier[NUPIN][=].system = "http://openhie.org/fhir/zambia-immunizations/identifier/nupin"
* identifier[NRC][+].value = "12-999-22-2338"
* identifier[NRC][=].system = "http://openhie.org/fhir/zambia-immunizations/identifier/nrc"
* name[+].use = #official
* name[=].family = "Smith"
* name[=].given[+] = "Jane"
* name[=].given[+] = "Maria"
* gender = #female
* birthDate = "1990-12-12"
* birthDate.extension[birthTime].valueDateTime = "1983-05-22T16:40:17+02:00"
* extension[BIZ].valueBoolean = true
* extension[IsEstimatedDOB].valueBoolean = false
* extension[EducationLevelAttained].valueCodeableConcept.coding.code = $LNC#LA42-7
* extension[EducationLevelAttained].valueCodeableConcept.coding.system = "http://loinc.org"
29 changes: 29 additions & 0 deletions input/fsh/extensions.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Extension: BornInZambia
Id: born-in-zambia
Title: "Patient born in Zambia?"
Description: "This is an extension to capture whether the patient was born in Zambia."
* value[x] only boolean
* value[x] 1..
* ^context[+].type = #element
* ^context[=].expression = "Patient"

Extension: IsEstimatedDateOfBirth
Id: is-estimated-date-of-birth
Title: "Patient's Date of Birth Is Estimated?"
Description: "This is an extension to capture whether the patient's date of birth was estimated."
* value[x] only boolean
* value[x] 1..
* ^context[+].type = #element
* ^context[=].expression = "Patient"

Extension: EducationLevelAttained
Id: education-level-attained
Title: "Patient's highest education level attained"
Description: "A list of education levels."
* value[x] only CodeableConcept
* valueCodeableConcept from VSLOINCEducationLevelAttained (required)
* valueCodeableConcept.text = "Highest education level attained"
* valueCodeableConcept.coding.system 1..1
* valueCodeableConcept.coding.code 1..1
* ^context[0].type = #element
* ^context[0].expression = "Patient"
Empty file removed input/fsh/profiles.fsh
Empty file.
6 changes: 6 additions & 0 deletions input/fsh/rulesets/client-registration.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RuleSet: ElementMap(source, target, equivalence)
* element[+]
* code = #{source}
* target[+]
* code = #{target}
* relationship = #{equivalence}
54 changes: 54 additions & 0 deletions input/fsh/smartcare.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Invariant: NUPIN-NRC-SmartcareID-1
Description: "Only letters, special characters (dash) and numbers are allowed."
Expression: "$this.matches('[A-Za-z0-9-]*')"
Severity: #error

Profile: ImmunizationPatient
Parent: Patient
Id: immunization-patient
Title: "Patient Profile for Immunizations"
Description: "Is used to document demographics and other administrative information about an individual receiving care or other health-related services."
* identifier 1..*
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.ordered = false
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
NUPIN 1..1 and
NRC 0..1 MS

* identifier[NUPIN].value 1..1
* obeys NUPIN-NRC-SmartcareID-1
* identifier[NUPIN].system 1..1
* identifier[NUPIN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/nupin"

* identifier[NRC] ^definition =
"reason(s) why this should be supported."
* identifier[NRC].value 1..1
* obeys NUPIN-NRC-SmartcareID-1
* identifier[NRC].system 1..1
* identifier[NRC].system = "http://openhie.org/fhir/zambia-immunizations/identifier/nrc"

* name 1..*
* name.given 1..*
* name.family 1..1
* name.use 1..1

* gender 1..1
* birthDate 1..1
* birthDate.extension contains patient-birthTime named birthTime 0..1 MS
* birthDate.extension[birthTime] ^definition =
"reason(s) why this should be supported."

* address.district 0..1 MS
* address.district ^definition =
"reason(s) why this should be supported."

* extension contains BornInZambia named BIZ 1..1
* extension contains IsEstimatedDateOfBirth named IsEstimatedDOB 0..1 MS
* extension[IsEstimatedDOB] ^definition =
"reason(s) why this should be supported."
* extension contains EducationLevelAttained named EduLevelAttained 0..1 MS
* extension[EduLevelAttained] ^definition =
"reason(s) why this should be supported."
44 changes: 44 additions & 0 deletions input/fsh/terminology.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Alias: $LNC = http://loinc.org

Alias: $GENDER = http://hl7.org/fhir/administrative-gender
Alias: $SEX = http://terminology.hl7.org/CodeSystem/v2-0001

Alias: $PROPRIETARY_EDU_LEVEL = http://openhie.org/fhir/zambia-immunizations/CodeSystem/cs-propietary-education-level-attained

CodeSystem: CSPropietaryEducationLevelAttained
Id: cs-propietary-education-level-attained
Title: "Patient's highest education level attained (Propietary)"
Description: "A list of propietary education levels."
* ^experimental = false
* ^caseSensitive = true
* #CertificateGraduate "Certificate Graduate" "The description"
* #DegreeGraduate "Degree Graduate" "The description"
* #DiplomaGraduate "Diploma Graduate" "The description"
* #JuniorSecondary "Junior Secondary" "The description"
* #MastersGraduate "Masters Graduate" "The description"
* #NoFormalEducation "No Formal Education" "The description"
* #PhDGraduate "PhD Graduate" "The description"
* #Primary "Primary" "The description"
* #SeniorSecondary "Senior Secondary" "The description"

ValueSet: VSPropietaryEducationLevelAttained
Id: vs-propietary-education-level-attained
Title: "Patient's highest education level attained (Propietary)"
Description: "A list of propietary education levels."
* ^experimental = false
* include codes from system CSPropietaryEducationLevelAttained

ValueSet: VSLOINCEducationLevelAttained
Id: vs-loinc-education-level-attained
Title: "Patient's highest education level attained (LOINC)"
Description: "A list of LOINC education levels."
* ^experimental = false
* $LNC#LA35-1 "No schooling"
* $LNC#LA42-7 "Graduate degree"
* $LNC#LA30193-9 "More than high school"
* $LNC#LA32469-1 "University undergraduate degree"
* $LNC#LA32466-7 "Primary school education"
* $LNC#LA36-9 "8th grade/less"
* $LNC#LA37-7 "9-11 grades"
* $LNC#LA12461-2 "Master's degree (e.g., MA, MS, MEng, MEd, MSW, MBA)"
* $LNC#LA30185-5 "Doctoral degree (e.g., PhD, EdD)"
12 changes: 12 additions & 0 deletions input/maps/AdministrativeSexToAdministrativeGender.fml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/// url = 'http://openhie.org/fhir/zambia-immunizations/StructureMap/AdministrativeSexToAdministrativeGender'
/// name = 'AdministrativeSexToAdministrativeGender'
/// description = 'Maps the Administrative Sex codes To Administrative Gender codes.'
/// title = 'Administrative Sex To Administrative Gender'
/// status = 'active'

uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias PatientProfile as source
uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias Patient as target

group SetPatientGender(source pat : PatientProfile, target patient : Patient) {
pat.gender as gender -> patient.gender = translate(gender, 'http://openhie.org/fhir/zambia-immunizations/ConceptMap/AdministrativeSexToAdministrativeGender', 'code') "SetGender";
}
14 changes: 14 additions & 0 deletions input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*/// url = 'http://openhie.org/fhir/zambia-immunizations/StructureMap/PropietaryEducationLevelToLOINCEducationLevel'
/// name = 'PropietaryEducationLevelToLOINCEducationLevel'
/// description = 'Maps the Propietary Educational Level codes To LOINC Educational Level codes.'
/// title = 'Propietary Educational Level To LOINC Educational Level'
/// status = 'active'

uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias PatientProfile as source
uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias Patient as target

group SetPatientEducationalLevel(source pat : PatientProfile, target patient : Patient) {
pat.extension:EduLevelAttained as eduLevelAttained -> patient as patty then {
//eduLevelAttained -> patty.code = translate(eduLevelAttained, 'http://openhie.org/fhir/zambia-immunizations/ConceptMap/PropietaryEducationLevelToLOINCEducationLevel', 'code') "SetEducationalLevel";
}
}*/
47 changes: 42 additions & 5 deletions input/pagecontent/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,48 @@
licensing requirements may limit the systems that data captured using certain questionnaires may be shared with.
</p>

<a name="disclaimer"> </a>
<h3>Disclaimer</h3>
<p>
The specification herewith documented is a demo working specification, and may not be used for any implementation purposes.
This draft is provided without warranty of completeness or consistency, and the official publication supersedes this draft.
<h3>Download</h3> <a name="download"></a>
<p>You can also download:</p>
<ul>
<li><a href="full-ig.zip">this entire guide</a>,</li>
<li>the definition resources in <a href="definitions.json.zip">json</a>, <a href="definitions.xml.zip">xml</a>, <a href="definitions.ttl.zip">ttl</a>, or <a href="csvs.zip">csv</a> format, or</li>
<li>the example resources in <a href="examples.json.zip">json</a>, <a href="examples.xml.zip">xml</a> or <a href="examples.ttl.zip">ttl</a> format.</li>
</ul>

<p>The source code for this Implementation Guide can be found on <a href="https://github.com/openhie/Training-Solution-1">OpenHIE GitHub</a>.</p>

<h3>Cross Version Analysis</h3> <a name="cross-version-analysis"></a>
<div>
{% include cross-version-analysis.xhtml %}
</div>

<h3>Dependency Table</h3> <a name="dependency-table"></a>
<div>
{% include dependency-table.xhtml %}
</div>

<h3>Globals Table</h3> <a name="globals-table"></a>
<div>
{% include globals-table.xhtml %}
</div>

<h3>IP Statements</h3> <a name="ip-statements"></a>
<div>
{% include ip-statements.xhtml %}
</div>

<h3>Intellectual Property Considerations</h3> <a name="ip"> </a>
<p>
While this implementation guide and the underlying FHIR are licensed as public domain, this guide may include examples making use of terminologies such
as LOINC, SNOMED CT and others which have more restrictive licensing requirements. Implementers should make themselves familiar with licensing and
any other constraints of terminologies, questionnaires, and other components used as part of their implementation process. In some cases,
licensing requirements may limit the systems that data captured using certain questionnaires may be shared with.
</p>

<h3>Disclaimer</h3> <a name="disclaimer"> </a>
<p>
This specification is provided without warranty of completeness or consistency, and the official publication supersedes this draft.
No liability can be inferred from the use or misuse of this specification, or its consequences.
</p>

</div>
Binary file added local-template/package/.index.db
Binary file not shown.
4 changes: 4 additions & 0 deletions local-template/package/.index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"index-version" : 2,
"files" : []
}
Binary file added local-template/package/content/.index.db
Binary file not shown.
4 changes: 4 additions & 0 deletions local-template/package/content/.index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"index-version" : 2,
"files" : []
}
Binary file not shown.
Loading

0 comments on commit 81e6335

Please sign in to comment.