Skip to content

Commit

Permalink
Kippi initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
amosref committed Mar 14, 2024
1 parent 260bd7a commit 9f50cec
Show file tree
Hide file tree
Showing 32 changed files with 340 additions and 44 deletions.
18 changes: 15 additions & 3 deletions ILCore/input/fsh/Aliases-fsh.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Alias: $ILVitalSigns = http://fhir.health.gov.il/StructureDefin
// IDs & licenses
Alias: $il-id = http://fhir.health.gov.il/identifier/il-national-id
Alias: $pna-id = http://fhir.health.gov.il/identifier/pna-national-id
Alias: $idf-sn = http://fhir.health.gov.il/identifier/idf-service-number
Alias: $prisoner-id = http://fhir.health.gov.il/identifier/il-prisoner-number
Alias: $id-type = http://terminology.hl7.org/CodeSystem/v2-0203
Alias: $legal-entity = http://fhir.health.gov.il/identifier/legal-entity
Alias: $moh-inst-symbol = http://institutions.health.gov.il/Institutions
Expand All @@ -70,6 +72,7 @@ Alias: $ext-hmo = http://fhir.health.gov.il/StructureDefin
Alias: $ext-parent-name = http://fhir.health.gov.il/StructureDefinition/ext-parent-name
Alias: $ext-procedure-reference = http://fhir.health.gov.il/StructureDefinition/ext-procedure-reference
Alias: $ext-medication-course-of-therapy-type = http://fhir.health.gov.il/StructureDefinition/ext-medication-course-of-therapy-type
Alias: $ext-medication-dose-form = http://fhir.health.gov.il/StructureDefinition/ext-medication-dose-form
Alias: $ext-narcotic-medication = http://fhir.health.gov.il/StructureDefinition/ext-narcotic-medication
Alias: $ext-admin-parent-name = http://fhir.health.gov.il/StructureDefinition/ext-administrative-parent-name
Alias: $ext-patient-immigration = http://fhir.health.gov.il/StructureDefinition/ext-patient-immigration
Expand All @@ -87,6 +90,8 @@ Alias: $ext-diagnostic-report-note = http://fhir.health.gov.il/StructureDefin
Alias: $ext-processing-location = http://fhir.health.gov.il/StructureDefinition/ext-processing-location
Alias: $ext-processing-practitioner = http://fhir.health.gov.il/StructureDefinition/ext-processing-practitioner
Alias: $ext-specimen-collector-reference = http://fhir.health.gov.il/StructureDefinition/ext-specimen-collector-reference
Alias: $ext-encounter-visitor-type = http://fhir.health.gov.il/StructureDefinition/ext-encounter-visitor-type
Alias: $ext-encounter-paying-entity = http://fhir.health.gov.il/StructureDefinition/ext-encounter-paying-entity

// Extensions - external
Alias: $ext-birth-place = http://hl7.org/fhir/StructureDefinition/patient-birthPlace
Expand All @@ -102,6 +107,7 @@ Alias: $relative-date = http://hl7.org/fhir/StructureDefinition/
Alias: $effective = http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate
Alias: $ext-language = http://hl7.org/fhir/StructureDefinition/language
Alias: $maxValueSet = http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
Alias: $modeOfArrival = http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival

// Codesystems - ILCore
Alias: $icd9-il = http://fhir.health.gov.il/cs/icd9il
Expand Down Expand Up @@ -132,11 +138,13 @@ Alias: $il-core-error-code = http://fhir.health.gov.il/cs/il-core-err
Alias: $il-core-religion-code = http://fhir.health.gov.il/cs/il-core-religion-code
Alias: $il-core-medication-course-of-therapy-type = http://fhir.health.gov.il/cs/il-core-medication-course-of-therapy-type
Alias: $not-performed-reason = http://fhir.health.gov.il/cs/il-core-not-performed-reason
Alias: $il-core-encounter-class = http://fhir.health.gov.il/cs/il-core-encounter-class
Alias: $il-core-encounter-class = http://fhir.health.gov.il/cs/il-core-encounter-class
Alias: $patient-visit-reason-moh = http://fhir.health.gov.il/cs/patient-visit-reason-moh
Alias: $patient-admit-source-moh = http://fhir.health.gov.il/cs/patient-admit-source-moh
Alias: $patient-release-type-moh = http://fhir.health.gov.il/cs/patient-release-type-moh
Alias: $moh-tofes17-issue-code = http://fhir.health.gov.il/cs/moh-tofes17-issue-code
Alias: $moh-tofes17-issue-code = http://fhir.health.gov.il/cs/moh-tofes17-issue-code
Alias: $patient-mode-of-arrival-moh = http://fhir.health.gov.il/cs/patient-mode-of-arrival-moh
Alias: $patient-visitor-type-moh = http://fhir.health.gov.il/cs/patient-visitor-type-moh
// Alias: $urn = http://fhir.health.gov.il/cs/il-core-urn

// Codesystems - external
Expand Down Expand Up @@ -208,10 +216,11 @@ Alias: $vs-il-core-environmental-allergy-intolerance = http://fhir.health.gov.il
Alias: $vs-il-core-biological-substance = http://fhir.health.gov.il/ValueSet/il-core-biological-substance
Alias: $vs-il-core-environmental-substance = http://fhir.health.gov.il/ValueSet/il-core-environmental-substance
Alias: $vs-il-core-food-substance = http://fhir.health.gov.il/ValueSet/il-core-food-substance
Alias: $vs-il-core-medication-administration-category = http://fhir.health.gov.il/ValueSet/il-core-medication-administration-category
Alias: $vs-il-core-medication-dose-form = http://fhir.health.gov.il/ValueSet/il-core-medication-dose-form
Alias: $vs-il-core-medication-substance = http://fhir.health.gov.il/ValueSet/il-core-medication-substance
Alias: $vs-il-core-medication-request-category = http://fhir.health.gov.il/ValueSet/il-core-medication-request-category
Alias: $vs-il-core-medication-statement-category = http://fhir.health.gov.il/ValueSet/il-core-medication-statement-category
Alias: $vs-il-core-medication-administration-category = http://fhir.health.gov.il/ValueSet/il-core-medication-administration-category
Alias: $vs-il-core-medication-dispense-category = http://fhir.health.gov.il/ValueSet/il-core-medication-dospense-category
Alias: $vs-il-core-medication-statement-code = http://fhir.health.gov.il/ValueSet/il-core-medication-statement-code
Alias: $vs-il-core-medication-course-of-therapy-type = http://fhir.health.gov.il/ValueSet/il-core-medication-course-of-therapy-type
Expand Down Expand Up @@ -251,6 +260,9 @@ Alias: $vs-not-performed-reason = http://fhir.health.gov.il/ValueSet/il-co
Alias: $vs-patient-visit-reason-moh = http://fhir.health.gov.il/ValueSet/patient-visit-reason-moh
Alias: $vs-patient-admit-source-moh = http://fhir.health.gov.il/ValueSet/patient-admit-source-moh
Alias: $vs-patient-release-type-moh = http://fhir.health.gov.il/ValueSet/patient-release-type-moh
Alias: $vs-patient-mode-of-arrival-moh = http://fhir.health.gov.il/ValueSet/patient-mode-of-arrival-moh
Alias: $vs-patient-visitor-type-moh = http://fhir.health.gov.il/ValueSet/patient-visitor-type-moh
Alias: $vs-encounter-paying-entity-moh = http://fhir.health.gov.il/ValueSet/encounter-paying-entity-moh


// ValueSets - external
Expand Down
13 changes: 13 additions & 0 deletions ILCore/input/fsh/Extensions/Extension-encounter-paying-entity.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension: EncounterPayingEntity
Id: ext-encounter-paying-entity
Title: "Ext: Encounter Paying Entity"
Description: "Paying Entity for the Encounter"
Context: Encounter
* ^url = $ext-encounter-paying-entity
* ^version = "0.13.0"
* ^status = #draft
* ^context.type = #element
* ^context.expression = "Encounter"
* value[x] 1..
* value[x] only CodeableConcept
* valueCodeableConcept from $vs-encounter-paying-entity-moh (example)
13 changes: 13 additions & 0 deletions ILCore/input/fsh/Extensions/Extension-encounter-visitor-type.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension: EncounterVisitorType
Id: ext-encounter-visitor-type
Title: "Ext: Encounter Visitor Type"
Description: "Classification of the visitor type (סוג מבקר/סוג כניסה) for the Encounter"
Context: Encounter
* ^url = $ext-encounter-visitor-type
* ^version = "0.13.0"
* ^status = #draft
* ^context.type = #element
* ^context.expression = "Encounter.subject"
* value[x] 1..
* value[x] only CodeableConcept
* valueCodeableConcept from $vs-patient-visitor-type-moh (example)
12 changes: 12 additions & 0 deletions ILCore/input/fsh/Extensions/Extension-medication-dose-form.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Extension: MedicationDoseForm
Id: ext-medication-dose-form
Title: "Ext: Medication Dose Form"
Description: "Extension: A coded representation of the type of dose form"

* ^url = $ext-medication-dose-form
* ^version = "0.13.0"
* ^status = #draft
* ^context.type = #element
* ^context.expression = "MedicationRequest.medication[x]"
* value[x] only CodeableConcept
* valueCodeableConcept from $vs-il-core-medication-dose-form (extensible)
16 changes: 14 additions & 2 deletions ILCore/input/fsh/Invariants.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Invariant: nine-digits-chk
Description: "All legal entities must have a 9 digit identifier"
Severity: #error
Expression:
"matches('[0-9]{9}')"
"matches('^\\d{9}$')"

Invariant: il-id-chk
Description: "Israeli ID must be 9-digits with a correct check-digit at the end."
Severity: #error
Expression:
"matches('[0-9]{9}') and
"matches('^\\d{9}$') and
substring(8,1).toInteger()=
(10-((substring(0,1).toInteger() +
substring(1,1).toInteger()*2 mod 10 +
Expand Down Expand Up @@ -131,6 +131,18 @@ Description: "If there is no a value a data absent reason must be present"
Expression: "value.exists() or dataAbsentReason.exists()"
Severity: #error

Invariant: il-prison-num
Description: "up to 8 digits prisoner number, allowing for hebrew characters"
Severity: #error
Expression:
"matches('^[a-zA-Z0-9_אבגדהוזחטי כלמנסעפצקרתשךףץ]{0,8}$')"

Invariant: idf-num
Description: "7 or 8 digit prisoner number"
Severity: #error
Expression:
"matches('^\\d{7,8}$')"

// TEMP ////////////////////////
Invariant: us-core-6
Description: "DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present."
Expand Down
17 changes: 17 additions & 0 deletions ILCore/input/fsh/NamingSystems/NamingSystem-idf-service-number.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Instance: idf-service-number
InstanceOf: NamingSystem
Usage: #definition

* name = "IDF Service Nuber"
* status = #active
* kind = #identifier
* date = "2024-02-22"
* publisher = "Israeli Ministry of Health"
* responsible = "Israeli Defense Forces"
* type.text = "Military Service Number"
* description = "Israel Defence forces Sevice number. A unique identifier for any soldier currently serving or having served in the IDF"
* jurisdiction[0] = urn:iso:std:iso:3166#IL
* usage = "Used in Israel for identifying soldiers"
* uniqueId[0].type = #uri
* uniqueId[0].value = "http://fhir.health.gov.il/identifier/idf-service-number"
* uniqueId[0].preferred = true
17 changes: 17 additions & 0 deletions ILCore/input/fsh/NamingSystems/NamingSystem-il-prisoner-number.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Instance: il-prisoner-number
InstanceOf: NamingSystem
Usage: #definition

* name = "IDF Service Nuber"
* status = #active
* kind = #identifier
* date = "2024-02-22"
* publisher = "Israeli Ministry of Health"
* responsible = "Israeli Prison Service"
* type.text = "Prisoner Number"
* description = "Israel Prison Service prisoner number. A unique identifier for any prisoner currently serving a prison sentence"
* jurisdiction[0] = urn:iso:std:iso:3166#IL
* usage = "Used in Israel for identifying prisoners"
* uniqueId[0].type = #uri
* uniqueId[0].value = "http://fhir.health.gov.il/identifier/il-prisoner-number"
* uniqueId[0].preferred = true
2 changes: 1 addition & 1 deletion ILCore/input/fsh/NamingSystems/NamingSystem-instructor.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Usage: #definition
* publisher = "Israeli Ministry of Health"
* responsible = "Israeli MoH"
* type = $id-type#AC "Accreditation/Certification Identifier"
* type.text = "Practitioner-instructor expertise accreditation number" //Is this correct?
* type.text = "Practitioner-instructor expertise accreditation number"
* description = "Identifies practitioner instructor according to Israeli MoH"
* jurisdiction[0] = urn:iso:std:iso:3166#IL
* usage = """SHOULD include a sequence number. I.e, \<expertise-certificate-number\>"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Usage: #definition
* type.text = "Medical License number"
* description = "Identifies Licensed medical proffesionals according to Israeli MoH"
* jurisdiction[0] = urn:iso:std:iso:3166#IL
* usage = """Should include the profession-code, a dash (-) and a sequence number. I.e., \<profession-code\>-\<profession-certificate-number\> where profession-code is a value of <a href=\"https://simplifier.net/ilcore/practitioner-profession-moh-duplicate-2\">PractitionerProfessionMoH</a>"""
* usage = """SHOULD include the profession-code, a dash (-) and a sequence number. I.e., \<profession-code\>-\<profession-certificate-number\> where profession-code is a value of <a href=\"https://simplifier.net/ilcore/practitioner-profession-moh-duplicate-2\">PractitionerProfessionMoH</a>"""
* uniqueId[0].type = #uri
* uniqueId[0].value = $practitioner-license-moh
* uniqueId[0].preferred = true
28 changes: 19 additions & 9 deletions ILCore/input/fsh/Profiles/IL-Core-Encounter.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ Description: "Israel Core proposed constraints and extensions on the Encounter R
* . ^definition = "Definitions for the profile-Encounter resource profile."
* . ^isModifier = false

* extension contains
$modeOfArrival named mode-of-arrival 0..1 and
$ext-encounter-paying-entity named paying-entity 0..1
* extension[modeOfArrival].valueCoding from $vs-patient-mode-of-arrival-moh (example)
* extension[paying-entity] ^short = "Extension: Encounter Paying Entity"
* extension[paying-entity] ^definition = "Paying Entity for the Encounter"

//Must Support + definitions
* identifier and status and class and subject and period and serviceProvider MS
* identifier ^definition = "Must support - <b>recieving system SHOULD store the value</b>"
* status ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* class ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* subject ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* period ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* serviceProvider ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* status ^definition = "Must support - <b>recieving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>"
* class ^definition = "Must support - <b>recieving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>"
* subject ^definition = "Must support - <b>recieving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>"
* period ^definition = "Must support - <b>recieving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>"
* serviceProvider ^definition = "Must support - <b>recieving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>"


* class from $vs-il-core-encounter-class (extensible)
Expand All @@ -39,14 +46,17 @@ Description: "Israel Core proposed constraints and extensions on the Encounter R
* serviceType from $vs-il-core-service-type (extensible)
* subject 1..1
* subject only Reference(ILCorePatient or ILCoreGroup)
* subject.extension contains $ext-encounter-visitor-type named visitor-type 0..1
* subject.extension[visitor-type] ^short = "Extension: Israeli CORE Encounter Visitor Type"
* subject.extension[visitor-type] ^definition = "Classification of the visitor type (סוג מבקר/סוג כניסה) for the Encounter"
* basedOn only Reference(ILCoreServiceRequest)
* participant ^slicing.discriminator.type = #value
* participant ^slicing.discriminator.path = "type"
* participant ^slicing.rules = #open
* participant contains
primary-performer 0..* MS
* participant[primary-performer]
* ^definition = "Must support - <b>recieving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* ^definition = "Must support - <b>receiving system either SHALL store the value or SHALL be able to translate it into internal state and SHALL be able to recover it when required to send data</b>"
* type MS
* type 1..1
* period MS
Expand All @@ -60,16 +70,16 @@ Description: "Israel Core proposed constraints and extensions on the Encounter R
* reasonCode ^slicing.discriminator.path = "$this"
* reasonCode ^slicing.rules = #open
* reasonCode contains moh-reason-code 0..*
* reasonCode[moh-reason-code] from $vs-patient-visit-reason-moh (required)
* reasonCode[moh-reason-code] from $vs-patient-visit-reason-moh (preferred)
* reasonReference only Reference(ILCoreCondition or ILCoreProcedure or ILCoreObservation or ImmunizationRecommendation)
* diagnosis.condition only Reference(ILCoreCondition or ILCoreProcedure)
* hospitalization.origin only Reference(ILCoreLocation or ILCoreOrganization)
* hospitalization.admitSource from $vs-moh-admit-source (extensible)
* hospitalization.admitSource from $vs-patient-admit-source-moh (preferred)
* hospitalization.destination only Reference(ILCoreLocation or ILCoreOrganization)
* hospitalization.extension contains $ext-movement-sequence-number named movement-number 0..1
* hospitalization.extension[movement-number] ^short = "Ext: Movement Sequence-Number"
* hospitalization.extension[movement-number] ^definition = "Extension: Movement Sequence-Number"
* hospitalization.dischargeDisposition from $vs-patient-release-type-moh (extensible)
* hospitalization.dischargeDisposition from $vs-patient-release-type-moh (example)
* location.location only Reference(ILCoreLocation)
* serviceProvider only Reference(ILCoreOrganization)
* partOf only Reference(ILCoreEncounter)
1 change: 1 addition & 0 deletions ILCore/input/fsh/Profiles/IL-Core-Medication.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Description: "Israel Core proposed constraints and extensions on the Medication
* . ^definition = "Definitions for the profile-Medication resource profile."
* . ^isModifier = false

* extension contains $ext-narcotic-medication named narcotic 0..1
* identifier.assigner only Reference(ILCoreOrganization)
* code 1..1 MS
* code from $vs-il-core-medication-code (extensible)
Expand Down
12 changes: 10 additions & 2 deletions ILCore/input/fsh/Profiles/IL-Core-MedicationDispense.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Description: "Israel Core proposed constraints and extensions on the MedicationD
* status and medication[x] and subject and performer and performer.actor and authorizingPrescription and type and quantity and whenHandedOver and dosageInstruction MS
* status ^short = "ILCore MedicationDispense Status"
* status ^definition = "ILCore MedicationDispense Status"
* subject 1..1
* extension contains
$ext-recorded-time named recorded 0..1
* extension[recorded] ^short = "Ext: Recorded Time"
Expand All @@ -30,8 +31,15 @@ Description: "Israel Core proposed constraints and extensions on the MedicationD
* medicationReference only Reference(ILCoreMedication)
* subject only Reference(ILCorePatient or ILCoreGroup)
* context only Reference(ILCoreEncounter or EpisodeOfCare)
* performer.actor only Reference(ILCorePractitioner or ILCorePractitionerRole or ILCoreOrganization or ILCorePatient or ILCoreDevice or ILCoreRelatedPerson)
* performer.actor only Reference(ILCorePractitioner or ILCorePractitionerRole or ILCoreOrganization
or ILCorePatient or ILCoreDevice or ILCoreRelatedPerson)
* location only Reference(ILCoreLocation)
* type from http://terminology.hl7.org/ValueSet/v3-ActPharmacySupplyType (extensible)
* quantity from $vs-il-core-common-units-of-measure (extensible)
* quantity ^binding.extension.url = $maxValueSet
* quantity ^binding.extension.valueCanonical = $vs-il-core-units-of-measure
* receiver only Reference(ILCorePractitioner or ILCorePatient)
* dosageInstruction only ILCoreDosage
* dosageInstruction only ILCoreDosage
* authorizingPrescription only Reference(ILCoreMedicationRequest)
* destination only Reference(ILCoreLocation)
* substitution.responsibleParty only Reference(ILCorePractitioner or ILCorePractitionerRole)
Loading

0 comments on commit 9f50cec

Please sign in to comment.