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

Provenance agent entity #166

Merged
merged 16 commits into from
Sep 2, 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
32 changes: 32 additions & 0 deletions input/fsh/examples/provenanceCustodianIndividual.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Instance: ProvenanceCustodianIndividual
InstanceOf: FiBaseInformationCustodianIndividual
Title: "Custodian of information (rekisterinpitäjä), an individual provider"
Description: "Example of Provenance that communicates a private individual healthcare provider as the custodian of information for an episode of care."
Usage: #example
* id = "custodian-individual"
* target = Reference(EpisodeOfCare/id-for-episode-1)
* recorded = "2015-02-07T13:28:17.239+02:00"
* agent[custodian]
* type
* coding[0] = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
* role[0]
* coding[0]
* system = "urn:oid:1.2.246.537.5.40172"
* code = #2
* display = "Yksityinen"
* text = "Yksityinen"
* who
* type = #Practitioner
* identifier
* type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
* system = "urn:oid:1.2.246.537.6.203"
* value = "urn:oid:1.2.246.537.28.10000222116"
* display = "Kalmanlehto Erkki"
* entity[registerType]
* role = #source
* what
* identifier
* system = "urn:oid:1.2.246.537.5.40150"
* value = #10
* display = "Ammatinharjoittaja"
42 changes: 42 additions & 0 deletions input/fsh/examples/provenanceCustodianOccupationalHealthcare.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Instance: ProvenanceCustodianOccupationalHealthcare
InstanceOf: FiBaseInformationCustodianPrivate
Title: "Custodian of information (rekisterinpitäjä), private occupational healthcare"
Description: "Example of Provenance that communicates a private occupational healthcare organization as the custodian of information for an episode of care."
Usage: #example
* id = "custodian-occupational-healthcare"
* target = Reference(EpisodeOfCare/id-for-episode-1)
* recorded = "2015-02-07T13:28:17.239+02:00"
* agent[custodian]
* type
* coding[0] = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
* role[0]
* coding[0]
* system = "urn:oid:1.2.246.537.5.40172"
* code = #2
* display = "Yksityinen"
* text = "Yksityinen"
* who
* type = #Organization
* identifier
* type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* system = "urn:oid:1.2.246.537.6.202"
* value = "urn:oid:1.2.246.10.32515682.10.0"
* display = "Ratinan Terveys Oy"
* entity[registerType]
* role = #source
* what
* identifier
* system = "urn:oid:1.2.246.537.5.40150"
* value = #4
* display = "Työterveyshuolto"
* entity[registerSpecifierCompanyId]
* role = #source
* what
* identifier
* type = http://terminology.hl7.org/CodeSystem/v2-0203#TAX
* system = "urn:oid:1.2.246.10"
* value = "2606155-7"
* display = "Sensotrend Oy"


32 changes: 32 additions & 0 deletions input/fsh/examples/provenanceCustodianPublicHealthcare.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Instance: ProvenanceCustodianPublicHealthcare
InstanceOf: FiBaseInformationCustodianPublic
Title: "Custodian of information (rekisterinpitäjä), public healthcare"
Description: "Example of Provenance that communicates a public healthcare organization as the custodian of information for an episode of care."
Usage: #example
* id = "custodian-public-healthcare"
* target = Reference(EpisodeOfCare/id-for-episode-1)
* recorded = "2023-08-25T16:42:17.239+03:00"
* agent[custodian]
* type
* coding[0] = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
* role[0]
* coding[0]
* system = "urn:oid:1.2.246.537.5.40172"
* code = #1
* display = "Julkinen"
* text = "Julkinen"
* who
* type = #Organization
* identifier
* type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* system = "urn:oid:1.2.246.537.6.40174"
* value = "urn:oid:1.2.246.10.32213086.19.0"
* display = "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
* entity[registerType]
* role = #source
* what
* identifier
* system = "urn:oid:1.2.246.537.5.40150"
* value = #2
* display = "Julkinen terveydenhuolto"
16 changes: 0 additions & 16 deletions input/fsh/examples/provenanceWithCustodianInformation.fsh

This file was deleted.

88 changes: 88 additions & 0 deletions input/fsh/informationCustodian.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Profile: FiBaseInformationCustodian
Parent: FiBaseProvenance
Id: fi-base-information-custodian
Title: "FI Base InformationCustodian"
Description: "This is a Finnish abstract base profile for the Provenance resource, used to communicate the custodian of information (*rekisterinpitäjä*)."
* ^abstract = true

* agent ^slicing.discriminator.type = #value
* agent ^slicing.discriminator.path = "type"
* agent ^slicing.rules = #open
* agent ^slicing.description = "An agent SHALL have the `type` `CST` from http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
* ^definition = "An agent SHALL have the `type` http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST, a `role` from system `oid:1.2.246.537.5.40172` (*eArkisto - Rekisteripitäjän laji*), and an applicable provider identifier."
* ^short = "An agent with type http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST"

* agent contains custodian 1..1
* agent[custodian].type = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST
* agent[custodian].role.coding.system = "urn:oid:1.2.246.537.5.40172"
* ^definition = "The status of the healthcare provider ([*eArkisto - Rekisteripitäjän laji*](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=268&versionKey=345)), i.e., whether the provider is a public or private actor. The value for the identifier SHALL be 1 for public, 2 for private."
* ^short = "Public or private occupational healthcare provider"

* entity ^slicing.discriminator.type = #value
* entity ^slicing.discriminator.path = "what.identifier.system"
* entity ^slicing.rules = #open
* entity ^slicing.description = "One entity SHALL have the `.role` `source` and a `.what` with an identifier with the system `urn:oid:1.2.246.537.5.40150` (*KanTa-palvelut - Potilasasiakirjan rekisteritunnus*) that indicates the type of the registry. If the identifier has the value 4 (*työterveyshuolto*, occupational healthcare), another entity element specifies the business ID (*y-tunnus*) of the customer organization."
* ^definition = "One entity SHALL have the `.role` `source` and a `.what` with an identifier with the system `urn:oid:1.2.246.537.5.40150` (*KanTa-palvelut - Potilasasiakirjan rekisteritunnus*) that indicates the type of the registry. If the identifier has the value 4 (*työterveyshuolto*, occupational healthcare), another entity element specifies the business ID (*y-tunnus*) of the customer organization."
* ^short = "Role source and a .what with an identifier with the system urn:oid:1.2.246.537.5.40150"

* entity contains registerType 1..1
* entity[registerType].role = #source
* entity[registerType].what.identifier.system = #urn:oid:1.2.246.537.5.40150
* ^definition = "The type of the information registry. From the system `oid:1.2.246.537.5.40150` ([*KanTa-palvelut - Potilasasiakirjan rekisteritunnus*](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=283&versionKey=360))."
* ^short = "Type of registry"

* entity contains registerSpecifierCompanyId 0..1
* entity[registerSpecifierCompanyId].role = #source
* entity[registerSpecifierCompanyId].what.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#TAX
* entity[registerSpecifierCompanyId].what.identifier.system = "urn:oid:1.2.246.10"
* ^definition = "The customer company of an occupational healthcare provider, expressed with the business ID (*y-tunnus*) registered in the Finnish organization register [ytj.fi](https://ytj.fi). This is a required specifier for Kanta system when the data registry is for occupational healthcare for private companies."
* ^short = "Customer company of private occupational healthcare"

* entity contains registerSpecifierPersonId 0..1
* entity[registerSpecifierPersonId].role = #source
* entity[registerSpecifierPersonId].what.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#NNFIN
* entity[registerSpecifierPersonId].what.identifier.system = "urn:oid:1.2.246.21"
* ^definition = "An individual customer of an occupational healthcare provider, expressed with the Finnish national PIC (*hetu*)."
* ^short = "Customer of private occupational healthcare"

* entity contains registerSpecifierCustomerWithoutId 0..1
* entity[registerSpecifierCustomerWithoutId].role = #source
* entity[registerSpecifierCustomerWithoutId].what.identifier.system = "urn:oid:1.2.246.537.30"
* ^definition = "A customer without a Finnish person or business ID as a customer of an occupational healthcare provider."
* ^short = "Customer of private occupational healthcare"

Profile: FiBaseInformationCustodianPublic
Parent: FiBaseInformationCustodian
Id: fi-base-information-custodian-public
Title: "FI Base Information Custodian (Public Organization)"
Description: "This is the Finnish base profile for the Provenance resource, used to communicate a public organization as the custodian of information (*rekisterinpitäjä*)."

* agent.role.coding.code = #1
* agent.who.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* agent.who.identifier.system = "urn:oid:1.2.246.537.6.40174"
* ^definition = "The ID of the social or healthcare provider in system `oid:1.2.246.537.6.40174` [(*eArkisto - Rekisterinpitäjärekisteri*)](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=419&versionKey=496)."
* ^short = "ID of the provider in Rekisterinpitäjärekisteri"

Profile: FiBaseInformationCustodianPrivate
Parent: FiBaseInformationCustodian
Id: fi-base-information-custodian-private
Title: "FI Base Information Custodian (Private Organization)"
Description: "This is the Finnish base profile for the Provenance resource, used to communicate a private organization as the custodian of information (*rekisterinpitäjä*)."

* agent.role.coding.code = #2
* agent.who.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* agent.who.identifier.system = "urn:oid:1.2.246.537.6.202"
* ^definition = "The ID of the social or healthcare provider in system `oid:1.2.246.537.6.202` [(*THL - SOTE-organisaatiorekisteri*)](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=421&versionKey=501)."
* ^short = "ID of the provider in SOTE-organisaatiorekisteri"

Profile: FiBaseInformationCustodianIndividual
Parent: FiBaseInformationCustodian
Id: fi-base-information-custodian-individual
Title: "FI Base Information Custodian (Individual Provider)"
Description: "This is the Finnish base profile for the Provenance resource, used to communicate an individual practitioner as the custodian of information (*rekisterinpitäjä*)."

* agent.role.coding.code = #2
* agent.who.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
* agent.who.identifier.system = "urn:oid:1.2.246.537.6.203"
* ^definition = "The ID of the social or healthcare provider in system `oid:1.2.246.537.6.203` [(*Valvira - Terveydenhuollon itsenäiset ammatinharjoittajat*)](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=1163&versionKey=1303)."
* ^short = "ID of the provider in Terveydenhuollon itsenäiset ammatinharjoittajat"
17 changes: 0 additions & 17 deletions input/fsh/provenance.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@ Parent: Provenance
Id: fi-base-provenance
Title: "FI Base Provenance"
Description: "This is the Finnish base profile for the Provenance resource."
* ^status = #draft

* location only Reference(FiBaseLocation)
* agent.who only Reference(FiBasePractitioner or FiBasePractitionerRole or FiBasePatient or RelatedPerson or Device or FiBaseOrganization)
* agent.onBehalfOf only Reference(FiBasePractitioner or FiBasePractitionerRole or FiBasePatient or RelatedPerson or Device or FiBaseOrganization)

* extension contains RegisterTypeCode named registerTypeCode 0..1
* extension contains RegisterSpecifier named registerSpecifier 0..1

Extension: RegisterTypeCode
Id: register-type-code
Title: "RegisterTypeCode"
Description: "Extension RegisterTypeCode. (Required for Kanta Medical Records queries) TODO what is the system?"
* value[x] only Coding

Extension: RegisterSpecifier
Id: register-specifier
Title: "RegisterSpecifier"
Description: "Extension Register Specifier (Rekisterin tarkenne in finnish) (Required for Kanta Medical Records queries)."
* value[x] only string
2 changes: 1 addition & 1 deletion input/ignoreWarnings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Code System URI 'urn:oid:1.2.246.537.5.40122.2006' is unknown so the code cannot
Code System URI 'urn:oid:1.2.246.537.5.40123.2006' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.5.40124.2006' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.5.40150.2009' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.5.40172' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.5.40202.201901' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.5.40303.201501' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.6.1.1999' is unknown so the code cannot be validated
Expand Down Expand Up @@ -76,7 +77,6 @@ Code System URI 'urn:oid:1.2.246.537.6.74.2001' is unknown so the code cannot be
Code System URI 'urn:oid:1.2.246.537.6.884.2015' is unknown so the code cannot be validated
Code System URI 'urn:oid:2.16.840.1.113883.18.220' is unknown so the code cannot be validated
Code System URI 'urn:oid:2.16.840.1.113883.4.642.3.20' is unknown so the code cannot be validated
Code System URI 'urn:oid:1.2.246.537.6.140.2008' is unknown so the code cannot be validated

# This is CGI's internal code system, not part of this IG, but present in some examples from CGI
Code System URI 'https://fhir.cgi.fi/code/person-id-type' is unknown so the code cannot be validated
Expand Down
2 changes: 2 additions & 0 deletions input/includes/fragment-fi-base-profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
{%- assign description = description | replace: "%3A", ":" -%}
{%- assign description = description | replace: "%20", "," -%}
{%- assign description = description | replace: "%25", "%" -%}
{%- assign description = description | replace: "(*", "(<i>" -%}
{%- assign description = description | replace: "*)", "</i>)" -%}
<li>
<a href="{{ pagepath }}">{{ pagetitle }}</a>
<p>{{ description }}</p>
Expand Down
20 changes: 0 additions & 20 deletions input/pagecontent/Provenance-id-for-provenance-1-intro.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Scope and Usage

#### How to communicate Kanta information custodian and register information

The Finnish national healthcare infrastructure uses the concept of the information custodian
(*rekisterinpitäjä*), also known as the data controller or register keeper.

Most of the information in the Kanta system needs to be tagged with information of the information
custodian and of the specific register.

For details, please refer to the
[Kanta CDA R2 Header](https://www.kanta.fi/en/jarjestelmakehittajat/potilastiedon-arkiston-cda-r2-header)
specification, version 4.66 or later, chapters 2.2.17, 2.4.21, and 2.4.22.

These details are expressed with the Provenance resource conforming to this profile. Information
custodian is the `.agent` and the registry is specified with one or two `.entity` instances.