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

Condition, Encounter and Provenance fixes #103

Merged
merged 8 commits into from
Apr 17, 2023
Merged
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
18 changes: 18 additions & 0 deletions input/fsh/condition.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Description: "Encoded information of whether this is the primary/main condition
* value[x] only Coding
* valueCoding 1..1
* system = #urn:oid:1.2.246.537.5.40005.2003
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: Permanence
Id: condition-permanence
Expand All @@ -31,6 +33,8 @@ Description: "Encoded information of whether this is the permanent."
* value[x] only Coding
* valueCoding 1..1
* system = #urn:oid:1.2.246.537.5.40003.2003
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: PhysicalExcercise
Id: condition-physical-excercise
Expand All @@ -39,40 +43,54 @@ Description: "Encoded information of the type of physical exercise during which
* value[x] only Coding
* valueCoding 1..1
* system = #urn:oid:1.2.246.537.6.301.201601
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: EndocrinologicalDisorder
Id: condition-endocrinological-disorder
Title: "Endocrinological disorder"
Description: "Code for Endocrinological disorder."
* value[x] only Coding
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: ConditionCausedByMedication
Id: condition-caused-by-medication
Title: "Medication that caused this condition"
Description: "Encoded information of medication that caused this condition. Uses ATC-coding."
* value[x] only Coding
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: ConditionExternalCause
Id: condition-external-cause
Title: "External cause for diagnosis"
Description: "External cause for diagnosis."
* value[x] only Coding
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: ConditionCategorizationOfAccident
Id: condition-categorization-of-accident
Title: "Categorization of the type of accident"
Description: "Encoded categorization of the type of accident leading to injury, illness or death."
* value[x] only Coding
* ^context[+].type = #element
* ^context[=].expression = "Condition"

Extension: CauseOfAdverseEffect
Id: condition-cause-of-adverse-effect
Title: "Cause of an adverse effect"
Description: "Encoded information on the cause of an adverse effect, when involving a procedure or medication"
* value[x] only Coding
* ^context[+].type = #element
* ^context[=].expression = "Condition"

CodeSystem: FiBaseConditionCategory
Id: fi-base-condition-category
Title: "Finnish Condition categories"
Description: "Additional categories for the Finnish Base Condition profile"
* ^experimental = false
* ^caseSensitive = true
* #reason-for-visit "Reason for visit"
"Indicates that this Condition is reason for visit (or treatment period). Reason for visit may be a diagnosis asserted by a clinician (a Diagnosis or Diagnoosi in finnish) or other healthcare professional (Käyntisyy in finnish)."
2 changes: 1 addition & 1 deletion input/fsh/examples/encounterAtWardInProgress.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Usage: #example
* class.system = #http://terminology.hl7.org/CodeSystem/v3-ActCode
* class.code = #IMP
* class.display = "inpatient encounter"
* subject.reference = "Patient/patient-of-municipalityt"
* subject.reference = "Patient/patient-of-municipality"
* period.start = "2022-02-27T01:03:00+02:00"
* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100012"
* location[0].status = #active
Expand Down
10 changes: 10 additions & 0 deletions input/fsh/examples/locationBedExample.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Instance: LocationBedExample
InstanceOf: FiBaseLocation
Usage: #example
Description: "Example of a bed."
* id = "id-for-bed-3"
* mode = #instance
* name = "Vuode 3"
* status = #active
* physicalType.coding.system = #http://terminology.hl7.org/CodeSystem/location-physical-type
* physicalType.coding.code = #bd
21 changes: 21 additions & 0 deletions input/fsh/examples/organizationHospitalUnit.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Instance: OrganizationHospitalUnit
InstanceOf: FiBaseOrganization
Title: "Encounter - example primary care organization"
// using partOf would cause warnings unless we add the full hierarchy in this repo.
Description: "An example of a FI Base organization, a surgical ward. The partOf reference removed for brevity."
Usage: #example
* id = "1.2.246.10.8286189.10.100012"
* identifier.use = #official
* identifier.system = #urn:oid:1.2.246.537.6.202.2008
* identifier.value = "1.2.246.10.8286189.10.100012"
* name = "Kirurgian vuodeosasto 4B, Länsi-Pohjan keskussairaala, LPSHP"
* alias = "Kirurgian vuodeosasto 4B, LPKS, LPSHP"
* address[0].type = #postal
* address[0].line[0] = "Kauppakatu 25, 94100 KEMI"
* address[0].postalCode = "94100"
* address[0].city = "KEMI"
* address[1].type = #physical
* address[1].line[0] = "Kauppakatu 25, 94100 KEMI"
* address[1].postalCode = "94100"
* address[1].city = "KEMI"
* active = true
16 changes: 15 additions & 1 deletion input/fsh/examples/organizationPrimaryCareUnit.fsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Instance: OrganizationPrimaryCare
InstanceOf: FiBaseOrganization
Title: "Encounter - example primary care organization"
Title: "Organization - example primary care organization"
Description: "An example of a FI Base organization, a doctor's reception office. Data is from national SOTE-Rekisteri."
Usage: #example
* id = "1.2.246.10.2085212.10.1314"
Expand All @@ -20,3 +20,17 @@ Usage: #example
* telecom[0].system = #phone
* telecom[0].value = "0401578947"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wanted to be really fancy, we could use the URL (tel:+358401578947) as value (see https://hl7.org/fhir/datatypes.html#ContactPoint):

If capturing a phone, fax or similar contact point, the value should be a properly formatted telephone number according to ITU-T E.123 icon. However, this is frequently not possible due to legacy data and/or clerical practices when recording contact details. For this reason, phone, fax, pager, and email addresses are not handled as formal URLs.

And then let it up to clients to format the phone numbers as they see fit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd kind of like to see that kind of encouragement in the implementation guide...

* active = true

// Providing minimal info of the parent organization for the example above,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could of course add this info in the description of the example too?

// no need to express full hierarchy here.
Instance: OrganizationPrimaryCareParent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be hard to find the source for this instance from this file. I'd like to see one file per example. But that may just be a personal preference...

InstanceOf: FiBaseOrganization
Title: "Organization - example of a parent organization"
Description: "An example of a FI Base organization. Acts as a parent organization for another."
Usage: #example
* id = "1.2.246.10.2085212.10.1306"
* identifier.use = #official
* identifier.system = #urn:oid:1.2.246.537.6.202.2008
* identifier.value = "1.2.246.10.2085212.10.1306"
* name = "Vastaanotot, SoTe kuntayhtymä Saarikka"
* active = true
2 changes: 1 addition & 1 deletion input/fsh/examples/provenanceWithCustodianInformation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: "Example of provenance that communicates custodian information for
* recorded = "2015-02-07T13:28:17.239+02:00"
* agent[0].who.type = #Organization
* agent[0].who.identifier.value = "1.2.246.10.32213043.19.0"
* agent[0].type.coding[0].system = "http://hl7.org/fhir/ValueSet/participation-role-type"
* agent[0].type.coding[0].system = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
* agent[0].type.coding[0].code = #custodian

* extension[RegisterTypeCode].valueCoding.system = #urn:oid:1.2.246.537.5.40150.2009
Expand Down