From 435d1437a11b8a8a85e801e94721d1d853a359c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Jylh=C3=A4?= Date: Thu, 2 Feb 2023 16:00:53 +0200 Subject: [PATCH 1/8] Sketch out another palvelutapahtuma interpretation Alternative to the one that uses extension. --- ...ctureDefinition-fi-base-encounter-intro.md | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md index 7fe1d3a..62ebae6 100644 --- a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md +++ b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md @@ -1,10 +1,50 @@ ### Scope and Usage -### Relation to Finnish Palvelutapahtuma +The Finnish Core Encounter profile is intended to encapsulate the most common and basic data model +of encounters in Finnish healthcare systems. The profile also defines how to communicate context +to the Kanta registry. As such the profile should be usable in most Finnish contexts. -TODO describe relation +### Relation to Finnish *palvelutapahtuma* -See the national spec https://www.kanta.fi/jarjestelmakehittajat/liite-2-palvelutapahtumien-esimerkkeja +[Kanta](https://www.kanta.fi/) is the Finnish national central registry of health and social +welfare information. It has a specification for Palvelutapahtuma, this is typically translated as +service-event or encompassing encounter. + +The scope of *palvelutapahtuma* is [described](https://www.kanta.fi/jarjestelmakehittajat/liite-2-palvelutapahtumien-esimerkkeja) +in Kanta-documentation (in finnish). It's scope is not always the same as encounter's. Encounter and +*palvelutapahtuma* will overlap as concepts (depending on implementation). Some encounters clearly align +with *palvelutapahtuma* while others don't. *Palvelutapahtuma* may contain multiple encounters. For example +a series of treatments is considered to be a singular *palvelutapahtuma*, but systems most likely want +to express each visit as a separate encounter (see kanta doc for the description of "hoitosarja", +there are other examples too). + +For deeper techical details, se Kanta [HL7 V3 Medical Records specification](https://www.kanta.fi/jarjestelmakehittajat/potilastiedon-arkiston-medical-records) +(this again in finnish). + +#### Why does encounter need this information? + +Kanta HL7 V3 Medical Records specification requires that both queries and archivals transmit +*palvelutapahtuma*'s OID identifier on each request. A client application that is integrated to a +patient administration system (one that masters the data of encounters) often needs to create and +query Kanta Medical records. Encounter is the best "vessel" we have to transmit this information. + +For example a laboratory information system may have it's own Kanta Medical Records capabilities +and will archive lab results directly to Kanta. It receives encounter id in SMART App Launch +context. Laboratory system can resolve Palvelutapahtuma`s OID identifier by fetching the encounter +resource. + +#### How to communicate palvelutapahtuma via FHIR encounter? + +First thing is to identify the appropriate aggregation level of encounter. If encounter is not +representing a *palvelutapahtuma*, but is a lower level encounter (some systems call these +*prosessitapahtuma*), parentOf -should be used to point to upper level encounter (up until +*palvelutapahtuma* -level is reached). + +*Palvelutapahtuma* -encounter is identified by identifier. When encounter has identifier with +`use=official` it SHOULD be considered as palvelutapahtuma and that identifier should be the +OID of *palvelutapahtuma*. + +Other levels of encounter that are not *palvelutapahtuma*, MUST not contain `use=official` identifier. ### Organizational responsibility From 595fd0931bcc484d37106557b0311c541c55602a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Jylh=C3=A4?= Date: Thu, 9 Feb 2023 16:02:51 +0200 Subject: [PATCH 2/8] Add examples for palvelutapahtuma --- .../examples/encounterPalvelutapahtuma.fsh | 49 +++++++++++++++++++ ...ctureDefinition-fi-base-encounter-intro.md | 4 +- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 input/fsh/examples/encounterPalvelutapahtuma.fsh diff --git a/input/fsh/examples/encounterPalvelutapahtuma.fsh b/input/fsh/examples/encounterPalvelutapahtuma.fsh new file mode 100644 index 0000000..b8bbd84 --- /dev/null +++ b/input/fsh/examples/encounterPalvelutapahtuma.fsh @@ -0,0 +1,49 @@ +Instance: EncounterPalvelutapahtuma +InstanceOf: FiBaseEncounter +Title: "Encounter that is a palvelutapahtuma in Kanta registry" +Description: "An example of a FI Base encounter which corresponds 1-1 to palvelutapahtuma in Kanta. Identifier with use=official marks the OID of palvelutapahtuma. Has sub-encounters." +Usage: #example +* id = "id-for-palvelutapahtuma" +* identifier.use = #official +* identifier.value = "1.2.246.10.6794809.14011.2023.200035" +* status = #in-progress +* class.system = "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode" +* class.code = #IMP +* class.display = "inpatient encounter" +* subject.reference = "Patient/id-for-patient" +* period.start = "2022-02-27T01:03:00+02:00" +* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100012" + +Instance: EncounterPartOfPalvelutapahtuma +InstanceOf: FiBaseEncounter +Title: "Encounter that is part of palvelutapahtuma" +Description: "An example of a FI Base encounter which is part of another encounter that corresponds palvelutapahtuma in Kanta." +Usage: #example +* id = "id-for-child-encounter" +* status = #in-progress +* class.system = "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode" +* class.code = #IMP +* class.display = "inpatient encounter" +* partOf = Reference(EncounterPalvelutapahtuma) +* subject.reference = "Patient/id-for-patient" +* period.start = "2022-02-27T01:03:00+02:00" +* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100013" +* location[0].status = #active +* location[0].period.start = "2022-02-27T01:03:00+02:00" +* location[0].location.reference = "Location/id-for-bed-3" + +Instance: EncounterPartOfPalvelutapahtuma2 +InstanceOf: FiBaseEncounter +Title: "Another Encounter that is part of palvelutapahtuma" +Description: "An example of a FI Base encounter which is part of another encounter that corresponds to palvelutapahtuma in Kanta." +Usage: #example +* id = "id-for-child-encounter-2" +* status = #finished +* class.system = "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode" +* class.code = #OBSENC +* class.display = "observation encounter" +* partOf = Reference(EncounterPalvelutapahtuma) +* subject.reference = "Patient/id-for-patient" +* period.start = "2022-02-28T12:03:00+02:00" +* period.end = "2022-02-28T12:18:00+02:00" +* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100014" diff --git a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md index 62ebae6..bf2f247 100644 --- a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md +++ b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md @@ -1,8 +1,8 @@ ### Scope and Usage The Finnish Core Encounter profile is intended to encapsulate the most common and basic data model -of encounters in Finnish healthcare systems. The profile also defines how to communicate context -to the Kanta registry. As such the profile should be usable in most Finnish contexts. +of encounters in Finnish healthcare systems. The profile also defines encounter's relation to the +Kanta registry. As such the profile should be usable in most Finnish contexts. ### Relation to Finnish *palvelutapahtuma* From 740825d68a08ee1bd51dc74c5d847e7ed511f2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Jylh=C3=A4?= Date: Thu, 9 Feb 2023 16:30:22 +0200 Subject: [PATCH 3/8] Fix apostrophe --- .../pagecontent/StructureDefinition-fi-base-encounter-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md index bf2f247..ef81f1a 100644 --- a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md +++ b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md @@ -30,7 +30,7 @@ query Kanta Medical records. Encounter is the best "vessel" we have to transmit For example a laboratory information system may have it's own Kanta Medical Records capabilities and will archive lab results directly to Kanta. It receives encounter id in SMART App Launch -context. Laboratory system can resolve Palvelutapahtuma`s OID identifier by fetching the encounter +context. Laboratory system can resolve Palvelutapahtuma´s OID identifier by fetching the encounter resource. #### How to communicate palvelutapahtuma via FHIR encounter? From 023787d2679e83ecb80feddbfc9f65f83fb8c817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Jylh=C3=A4?= Date: Fri, 10 Feb 2023 17:15:48 +0200 Subject: [PATCH 4/8] Fix wording on encounter --- .../StructureDefinition-fi-base-encounter-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md index ef81f1a..1777dc2 100644 --- a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md +++ b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md @@ -30,7 +30,7 @@ query Kanta Medical records. Encounter is the best "vessel" we have to transmit For example a laboratory information system may have it's own Kanta Medical Records capabilities and will archive lab results directly to Kanta. It receives encounter id in SMART App Launch -context. Laboratory system can resolve Palvelutapahtuma´s OID identifier by fetching the encounter +context. Laboratory system can resolve *palvelutapahtuma*'s OID identifier by fetching the encounter resource. #### How to communicate palvelutapahtuma via FHIR encounter? @@ -44,7 +44,7 @@ representing a *palvelutapahtuma*, but is a lower level encounter (some systems `use=official` it SHOULD be considered as palvelutapahtuma and that identifier should be the OID of *palvelutapahtuma*. -Other levels of encounter that are not *palvelutapahtuma*, MUST not contain `use=official` identifier. +Other levels of encounter that are not *palvelutapahtuma*, MUST NOT contain `use=official` identifier. ### Organizational responsibility From 285f92dc3299166b6fe3ee4e3bf34cebd4cf4827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Jylh=C3=A4?= Date: Fri, 10 Feb 2023 17:17:00 +0200 Subject: [PATCH 5/8] Change palvelutapahtuma example's references Use identifier instead of id. --- input/fsh/examples/encounterPalvelutapahtuma.fsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/input/fsh/examples/encounterPalvelutapahtuma.fsh b/input/fsh/examples/encounterPalvelutapahtuma.fsh index b8bbd84..fa10546 100644 --- a/input/fsh/examples/encounterPalvelutapahtuma.fsh +++ b/input/fsh/examples/encounterPalvelutapahtuma.fsh @@ -27,7 +27,8 @@ Usage: #example * partOf = Reference(EncounterPalvelutapahtuma) * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-27T01:03:00+02:00" -* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100013" +* serviceProvider.type = #serviceProvider +* serviceProvider.identifier.value = "1.2.246.10.8286189.10.100013" * location[0].status = #active * location[0].period.start = "2022-02-27T01:03:00+02:00" * location[0].location.reference = "Location/id-for-bed-3" @@ -46,4 +47,6 @@ Usage: #example * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-28T12:03:00+02:00" * period.end = "2022-02-28T12:18:00+02:00" -* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100014" +* serviceProvider.type = #serviceProvider +* serviceProvider.identifier.value = "1.2.246.10.8286189.10.100014" + From ef93d0d1e8083b06a21cd0840bf7b905c3b0681c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Rinnetm=C3=A4ki?= Date: Sun, 12 Feb 2023 14:31:28 +0200 Subject: [PATCH 6/8] Reference type should be expressed in CamelCase Right? --- input/fsh/examples/encounterPalvelutapahtuma.fsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/fsh/examples/encounterPalvelutapahtuma.fsh b/input/fsh/examples/encounterPalvelutapahtuma.fsh index fa10546..9bc0158 100644 --- a/input/fsh/examples/encounterPalvelutapahtuma.fsh +++ b/input/fsh/examples/encounterPalvelutapahtuma.fsh @@ -27,7 +27,7 @@ Usage: #example * partOf = Reference(EncounterPalvelutapahtuma) * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-27T01:03:00+02:00" -* serviceProvider.type = #serviceProvider +* serviceProvider.type = #ServiceProvider * serviceProvider.identifier.value = "1.2.246.10.8286189.10.100013" * location[0].status = #active * location[0].period.start = "2022-02-27T01:03:00+02:00" @@ -47,6 +47,6 @@ Usage: #example * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-28T12:03:00+02:00" * period.end = "2022-02-28T12:18:00+02:00" -* serviceProvider.type = #serviceProvider +* serviceProvider.type = #ServiceProvider * serviceProvider.identifier.value = "1.2.246.10.8286189.10.100014" From 90054255692cfa82e63096e15dc9cecea4bff78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Rinnetm=C3=A4ki?= Date: Sun, 12 Feb 2023 14:32:39 +0200 Subject: [PATCH 7/8] Use structured reference for first example too --- input/fsh/examples/encounterPalvelutapahtuma.fsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/fsh/examples/encounterPalvelutapahtuma.fsh b/input/fsh/examples/encounterPalvelutapahtuma.fsh index 9bc0158..fe7f511 100644 --- a/input/fsh/examples/encounterPalvelutapahtuma.fsh +++ b/input/fsh/examples/encounterPalvelutapahtuma.fsh @@ -12,7 +12,8 @@ Usage: #example * class.display = "inpatient encounter" * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-27T01:03:00+02:00" -* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100012" +* serviceProvider.type = #ServiceProvider +* serviceProvider.identifier.value = "1.2.246.10.8286189.10.100012" Instance: EncounterPartOfPalvelutapahtuma InstanceOf: FiBaseEncounter From 75cf97309be92c1f0f29b4be6e05350f0149fc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Rinnetm=C3=A4ki?= Date: Sun, 12 Feb 2023 14:56:05 +0200 Subject: [PATCH 8/8] Revert "Use structured reference for first example too" This reverts commit 90054255692cfa82e63096e15dc9cecea4bff78a. This was the actual id for the resource after all. My bad. --- input/fsh/examples/encounterPalvelutapahtuma.fsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/input/fsh/examples/encounterPalvelutapahtuma.fsh b/input/fsh/examples/encounterPalvelutapahtuma.fsh index fe7f511..9bc0158 100644 --- a/input/fsh/examples/encounterPalvelutapahtuma.fsh +++ b/input/fsh/examples/encounterPalvelutapahtuma.fsh @@ -12,8 +12,7 @@ Usage: #example * class.display = "inpatient encounter" * subject.reference = "Patient/id-for-patient" * period.start = "2022-02-27T01:03:00+02:00" -* serviceProvider.type = #ServiceProvider -* serviceProvider.identifier.value = "1.2.246.10.8286189.10.100012" +* serviceProvider.reference = "Organization/1.2.246.10.8286189.10.100012" Instance: EncounterPartOfPalvelutapahtuma InstanceOf: FiBaseEncounter