diff --git a/input/examples/VIRHE2_KELABASELISAYKSET-Provenance-custodian-public-healthcare.json b/input/examples/VIRHE2_KELABASELISAYKSET-Provenance-custodian-public-healthcare.json
new file mode 100644
index 0000000..9021ba2
--- /dev/null
+++ b/input/examples/VIRHE2_KELABASELISAYKSET-Provenance-custodian-public-healthcare.json
@@ -0,0 +1,147 @@
+{
+ "resourceType": "Provenance",
+ "id": "custodian-public-healthcare-kela",
+ "meta": {
+ "profile": [
+ "https://tietohiisi.fi/fhir/teehoo-base-profiles/StructureDefinition/th-base-information-custodian-public"
+ ]
+ },
+ "text": {
+ "status": "generated",
+ "div": "
Generated Narrative: Provenance
target: EpisodeOfCare/id-for-episode-1
recorded: Aug 25, 2023, 1:42:17 PM
Agents
- | Type | Role | Who |
* | Rekisterinpitäjä (ParticipationType#CST "custodian") | Julkinen (unknown#1) | : Pirkanmaan hyvinvointialueen rekisterinpitäjä |
Entities
- | Role | What |
* | source | : Julkinen terveydenhuolto |
"
+ },
+ "contained": [
+ {
+ "resourceType": "Organization",
+ "id": "jarjestajaorg1",
+ "identifier": [
+ {
+ "system": "urn:oid:1.2.246.537.6.40174",
+ "value": "urn:oid:1.2.246.10.32213086.10.0"
+ }
+ ],
+ "name": "Pirkanmaan hyvinvointialue"
+ },
+ {
+ "resourceType": "Organization",
+ "id": "tuottajaorg1",
+ "identifier": [
+ {
+ "system": "urn:oid:1.2.246.537.6.40174",
+ "value": "urn:oid:1.2.246.10.32213086.10.0"
+ }
+ ],
+ "name": "Pirkanmaan hyvinvointialue"
+ }
+ ],
+ "target": [
+ {
+ "reference": "EpisodeOfCare/id-for-episode-1"
+ }
+ ],
+ "recorded": "2023-08-25T16:42:17.239+03:00",
+ "agent": [
+ {
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
+ "code": "CST",
+ "display": "custodian"
+ }
+ ],
+ "text": "Rekisterinpitäjä"
+ },
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "urn:oid:1.2.246.537.5.40172",
+ "code": "1",
+ "display": "Julkinen"
+ }
+ ],
+ "text": "Julkinen"
+ }
+ ],
+ "who": {
+ "type": "Organization",
+ "identifier": {
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
+ "code": "PRN"
+ }
+ ]
+ },
+ "system": "urn:oid:1.2.246.537.6.40174",
+ "value": "urn:oid:1.2.246.10.32213086.19.0"
+ },
+ "display": "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
+ }
+ },
+ {
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "http://gen.kanta.fi/fikanta-cs-rolecategory",
+ "code": "8",
+ "display": "Palvelunjärjestäjä"
+ }
+ ]
+ }
+ ],
+ "who": {
+ "reference": "#jarjestajaorg1"
+ }
+ },
+ {
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "http://gen.kanta.fi/fikanta-cs-rolecategory",
+ "code": "11",
+ "display": "Palveluntuottaja"
+ }
+ ]
+ }
+ ],
+ "who": {
+ "reference": "#tuottajaorg1"
+ }
+ }
+ ],
+ "entity": [
+ {
+ "role": "source",
+ "what": {
+ "identifier": {
+ "system": "urn:oid:1.2.246.537.5.40150",
+ "value": "4"
+ },
+ "display": "Työterveyshuolto"
+ }
+ },
+ {
+ "role": "source",
+ "what": {
+ "identifier": {
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
+ "code": "XX"
+ }
+ ]
+ },
+ "system": "urn:oid:1.2.246.10",
+ "value": "2606155-7"
+ },
+ "display": "Sensotrend Oy"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/input/examples/provenance_rekpit_containedviittaukset2.json b/input/examples/provenance_rekpit_containedviittaukset2.json
new file mode 100644
index 0000000..005f45b
--- /dev/null
+++ b/input/examples/provenance_rekpit_containedviittaukset2.json
@@ -0,0 +1,186 @@
+{
+ "resourceType": "Provenance",
+ "id": "id-for-provenance-1",
+ "meta": {
+ "profile": [
+ "https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/fi-base-information-custodian"
+ ]
+ },
+ "text": {
+ "status": "additional",
+ "div": "Narrative: An example provenance resource instance including information custodianship and other metadata.
"
+ },
+ "contained": [
+ {
+ "resourceType": "Organization",
+ "id": "custodianorg1",
+ "text": {
+ "status": "generated",
+ "div": "Suomen Terveystalo Oy
"
+ },
+ "identifier": [
+ {
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:oid:1.2.246.10.10938633.10.0"
+ }
+ ],
+ "name": "Suomen Terveystalo Oy"
+ },
+ {
+ "resourceType": "Organization",
+ "id": "jarjestajaorg1",
+ "text": {
+ "status": "empty",
+ "div": "Järjestäjäorganisaatio
"
+ },
+ "name": "Järjestäjäorganisaatio"
+ },
+ {
+ "resourceType": "Organization",
+ "id": "tuottajaorg1",
+ "text": {
+ "status": "empty",
+ "div": "Tuottajaorganisaatio
"
+ },
+ "name": "Tuottajaorganisaatio"
+ }
+ ],
+ "extension": [
+ {
+ "url": "https://gen.kanta.fi/fhir/StructureDefinition/extension/RegisterType",
+ "valueCoding": {
+ "system": "urn:oid:1.2.246.537.5.40150.2009",
+ "code": "4",
+ "display": "Työterveyshuolto"
+ }
+ },
+ {
+ "url": "https://gen.kanta.fi/fhir/StructureDefinition/extension/RegisterSpecifier",
+ "extension": [
+ {
+ "url": "RegisterSpecifier",
+ "valueIdentifier": {
+ "system": "urn:oid:1.2.246.10",
+ "value": "0246246-0"
+ }
+ },
+ {
+ "url": "RegisterSpecifierName",
+ "valueString": "Kansaneläkelaitos"
+ }
+ ]
+ }
+ ],
+ "target": [
+ {
+ "reference": "AuditEvent/id-for-auditevent-1"
+ }
+ ],
+ "recorded": "2015-02-07T13:28:17.239+02:00",
+ "agent": [
+ {
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
+ "code": "CST",
+ "display": "custodian"
+ }
+ ]
+ },
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "urn:oid:1.2.246.537.5.40172",
+ "code": "2",
+ "display": "Yksityinen"
+ },
+ {
+ "system": "http://gen.kanta.fi/fikanta-cs-rolecategory",
+ "code": "9",
+ "display": "Rekisterinpitäjä"
+ }
+ ]
+ }
+ ],
+ "who": {
+ "reference": "#custodianorg1",
+ "identifier": {
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
+ "code": "PRN"
+ }
+ ]
+ },
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:oid:1.2.246.10.10938633.10.0"
+ }
+ }
+ },
+ {
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "http://gen.kanta.fi/fikanta-cs-rolecategory",
+ "code": "8",
+ "display": "Palvelunjärjestäjä"
+ }
+ ]
+ }
+ ],
+ "who": {
+ "reference": "#jarjestajaorg1"
+ }
+ },
+ {
+ "role": [
+ {
+ "coding": [
+ {
+ "system": "http://gen.kanta.fi/fikanta-cs-rolecategory",
+ "code": "11",
+ "display": "Palveluntuottaja"
+ }
+ ]
+ }
+ ],
+ "who": {
+ "reference": "#tuottajaorg1"
+ }
+ }
+ ],
+ "entity" : [
+ {
+ "role" : "source",
+ "what" : {
+ "identifier" : {
+ "system" : "urn:oid:1.2.246.537.5.40150",
+ "value" : "4"
+ },
+ "display" : "Työterveyshuolto"
+ }
+ },
+ {
+ "role" : "source",
+ "what" : {
+ "identifier" : {
+ "type" : {
+ "coding" : [
+ {
+ "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
+ "code" : "XX"
+ }
+ ]
+ },
+ "system" : "urn:oid:1.2.246.10",
+ "value" : "0246246-0"
+ },
+ "display" : "Kansaneläkelaitos"
+ }
+ }
+ ]
+}
diff --git a/input/fsh/examples/kantaCustodian.fsh b/input/fsh/examples/kantaCustodian.fsh
new file mode 100644
index 0000000..5ed5986
--- /dev/null
+++ b/input/fsh/examples/kantaCustodian.fsh
@@ -0,0 +1,245 @@
+Profile: KantaDocumentMetadata
+Parent: FiBaseProvenance
+Id: kanta-document-metadata-profile
+Title: "An imaginary profile for Kanta system, utilizing the Finnish Base Information Custodian profile"
+Description: "This is one way in which a system might use the Finnish Base Information Custodian profile. Kanta has expressed the wish to have only one big Provenance resource containing all document metadata. This can be accomplished by creating a profile based on the Finnish Base Provenance profile and [imposing](http://hl7.org/fhir/extensions/StructureDefinition-structuredefinition-imposeProfile.html) the Finnish Base Information Custodian profile."
+* ^extension[0].url = "http://hl7.org/fhir/StructureDefinition/structuredefinition-imposeProfile"
+* ^extension[=].valueCanonical = "https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/fi-base-information-custodian"
+* ^extension[+].url = "http://hl7.org/fhir/StructureDefinition/structuredefinition-imposeProfile"
+* ^extension[=].valueCanonical = "https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/kanta-document-other-metadata-profile"
+
+Profile: KantaDocumentOtherMetadata
+Parent: FiBaseProvenance
+Id: kanta-document-other-metadata-profile
+Title: "An imaginary profile for Kanta system, specifying things apart from the information custodian"
+Description: "This is one way in which a system might use the Finnish Base Information Custodian profile. This profile defines other constraints. The profile KantaDocumentMetadata combines the requirements."
+
+* agent.role ^slicing.discriminator.type = #value
+* agent.role ^slicing.discriminator.path = "coding.system"
+* agent.role ^slicing.rules = #open
+* agent.role ^slicing.description = "Kanta specific profiling"
+
+* agent.role[kantaCoding].coding.system
+
+* agent.role contains kantaCoding 1..*
+* agent.role[kantaCoding].coding.system from http://gen.kanta.fi/kanta-provenance-agent-role
+
+
+Instance: KantaProvenanceAgentRole
+InstanceOf: ValueSet
+Title: "Example value set for provenance roles"
+Description: "This example value set contains the systems that can be used for agent roles in Kanta profiles"
+Usage: #definition
+* experimental = false
+* id = "kanta-provenance-agent-role"
+* url = "http://gen.kanta.fi/kanta-provenance-agent-role"
+* status = #draft
+* compose
+ * include[0]
+ * system = "urn:ietf:rfc:3986"
+ * concept
+ * code = #http://gen.kanta.fi/fikanta-cs-rolecategory
+ * display = "Kanta specified roles"
+ * include[+]
+ * system = "urn:ietf:rfc:3986"
+ * concept
+ * code = #urn:oid:1.2.246.537.5.40172
+ * display = "eArkisto - Rekisteripitäjän laji"
+
+Instance: KantaDocumentMetadataExample
+InstanceOf: KantaDocumentMetadata
+Title: "An imaginary example of a Provenance resource instance conforming to the imaginary metadata profile for Kanta system"
+Description: "This example demonstrates one way in which a system might use the Finnish Base Information Custodian profile."
+Usage: #example
+* id = "kanta-document-metadata-profile-example"
+* contained[0]
+ * resourceType = "Organization"
+ * id = "jarjestajaorg1"
+ * identifier[0]
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.10.0"
+ * name = "Pirkanmaan hyvinvointialue"
+* contained[+]
+ * resourceType = "Organization"
+ * id = "tuottajaorg1"
+ * identifier[0]
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.10.0"
+ * name = "Pirkanmaan hyvinvointialue"
+* agent[0]
+ * type
+ * coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
+ * text = "Rekisterinpitäjä"
+ * role[0]
+ * coding = urn:oid:1.2.246.537.5.40172#1 "Julkinen"
+ * text = "Julkinen"
+ * who[0]
+ * type = "Organization"
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.19.0"
+ * display = "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#8 "Palvelunjärjestäjä"
+ * who.reference = "#jarjestajaorg1"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#11 "Palveluntuottaja"
+ * who.reference = "#tuottajaorg1"
+* entity[0]
+ * role = #source
+ * what
+ * identifier
+ * system = "urn:oid:1.2.246.537.5.40150"
+ * value = "4"
+ * display = "Työterveyshuolto"
+* entity[+]
+ * role = #source
+ * what
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * system = "urn:oid:1.2.246.10"
+ * value = "2606155-7"
+ * display = "Sensotrend Oy"
+* target[0].reference = "EpisodeOfCare/id-for-episode-1"
+* recorded = "2023-08-25T16:42:17.239+03:00"
+
+Instance: KantaDocumentMetadataExample2
+InstanceOf: KantaDocumentMetadata
+Title: "An imaginary example of a Provenance resource instance conforming to the imaginary metadata profile for Kanta system, using the kanta code also for the custodian agent"
+Description: "This example demonstrates one way in which a system might use the Finnish Base Information Custodian profile."
+Usage: #example
+* id = "kanta-document-metadata-profile-example-2"
+* contained[0]
+ * resourceType = "Organization"
+ * id = "jarjestajaorg1"
+ * identifier[0]
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.10.0"
+ * name = "Pirkanmaan hyvinvointialue"
+* contained[+]
+ * resourceType = "Organization"
+ * id = "tuottajaorg1"
+ * identifier[0]
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.10.0"
+ * name = "Pirkanmaan hyvinvointialue"
+* agent[0]
+ * type
+ * coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
+ * text = "Rekisterinpitäjä"
+ * role[0]
+ * coding = urn:oid:1.2.246.537.5.40172#1 "Julkinen"
+ * text = "Julkinen"
+ * role[+]
+ * coding = http://gen.kanta.fi/fikanta-cs-rolecategory#2 "Rekisterinpitäjä" // Don't know which is the right code, just selecting one...
+ * text = "Rekisterinpitäjä"
+ * who[0]
+ * type = "Organization"
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.19.0"
+ * display = "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#8 "Palvelunjärjestäjä"
+ * who.reference = "#jarjestajaorg1"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#11 "Palveluntuottaja"
+ * who.reference = "#tuottajaorg1"
+* entity[0]
+ * role = #source
+ * what
+ * identifier
+ * system = "urn:oid:1.2.246.537.5.40150"
+ * value = "4"
+ * display = "Työterveyshuolto"
+* entity[+]
+ * role = #source
+ * what
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * system = "urn:oid:1.2.246.10"
+ * value = "2606155-7"
+ * display = "Sensotrend Oy"
+* target[0].reference = "EpisodeOfCare/id-for-episode-1"
+* recorded = "2023-08-25T16:42:17.239+03:00"
+
+Instance: KantaDocumentMetadataFailingExample1
+InstanceOf: KantaDocumentMetadata
+Title: "A test example demonstrating that validation works"
+Description: "This example does not have the registerType entity mandated by the Finnish Base Information Custodian profile. QA report is expected to show an error."
+Usage: #example
+* id = "kanta-document-metadata-profile-test-example-1"
+* contained[0]
+ * resourceType = "Organization"
+ * id = "the-same-org"
+ * identifier[0]
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.10.0"
+ * name = "Pirkanmaan hyvinvointialue"
+* agent[0]
+ * type
+ * coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
+ * text = "Rekisterinpitäjä"
+ * role[0]
+ * coding = urn:oid:1.2.246.537.5.40172#1 "Julkinen"
+ * text = "Julkinen"
+ * who[0]
+ * type = "Organization"
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
+ * system = "urn:oid:1.2.246.537.6.40174"
+ * value = "urn:oid:1.2.246.10.32213086.19.0"
+ * display = "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#8 "Palvelunjärjestäjä"
+ * who.reference = "#the-same-org"
+* agent[+]
+ * role[0].coding = http://gen.kanta.fi/fikanta-cs-rolecategory#11 "Palveluntuottaja"
+ * who.reference = "#the-same-org"
+* entity[0]
+ * role = #source
+ * what
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * system = "urn:oid:1.2.246.10"
+ * value = "2606155-7"
+ * display = "Sensotrend Oy"
+* target[0].reference = "EpisodeOfCare/id-for-episode-1"
+* recorded = "2023-08-25T16:42:17.239+03:00"
+
+Instance: KantaDocumentMetadataFailingExample2
+InstanceOf: KantaDocumentMetadata
+Title: "Another test example demonstrating that validation works"
+Description: "This example does not have a role with the code system specified by Kanta. QA report is expected to show an error."
+Usage: #example
+* id = "kanta-document-metadata-profile-test-example-2"
+* agent[0]
+ * type
+ * coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
+ * text = "Rekisterinpitäjä"
+ * who[0]
+ * type = "Organization"
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
+ * 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[0]
+ * role = #source
+ * what
+ * identifier
+ * system = "urn:oid:1.2.246.537.5.40150"
+ * value = "4"
+ * display = "Työterveyshuolto"
+* entity[+]
+ * role = #source
+ * what
+ * identifier
+ * type.coding = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * system = "urn:oid:1.2.246.10"
+ * value = "2606155-7"
+ * display = "Sensotrend Oy"
+* target[0].reference = "EpisodeOfCare/id-for-episode-1"
+* recorded = "2023-08-25T16:42:17.239+03:00"
diff --git a/input/fsh/examples/patientOfMunicipality.fsh b/input/fsh/examples/patientOfMunicipality.fsh
index baa9d2c..05055f8 100644
--- a/input/fsh/examples/patientOfMunicipality.fsh
+++ b/input/fsh/examples/patientOfMunicipality.fsh
@@ -14,6 +14,7 @@ Usage: #example
* name
* given = "Testi"
* family = "Henkilö"
+ * text = "Testi Henkilö"
* telecom.system = #phone
* telecom.value = "+358401234657"
* address.use = #home
diff --git a/input/fsh/examples/patientWithTurvakielto.fsh b/input/fsh/examples/patientWithTurvakielto.fsh
index 584068b..c85dd6c 100644
--- a/input/fsh/examples/patientWithTurvakielto.fsh
+++ b/input/fsh/examples/patientWithTurvakielto.fsh
@@ -14,5 +14,6 @@ Usage: #example
* name
* given = "Turva"
* family = "Henkilö"
+ * text = "Turva Henkilö"
* active = true
* extension[MunicipalityCode].valueCoding = urn:oid:1.2.246.537.6.21|2003#020 "Akaa"
diff --git a/input/fsh/examples/practitionerLicensedPhysician.fsh b/input/fsh/examples/practitionerLicensedPhysician.fsh
index 3bb5068..7078b62 100644
--- a/input/fsh/examples/practitionerLicensedPhysician.fsh
+++ b/input/fsh/examples/practitionerLicensedPhysician.fsh
@@ -4,6 +4,7 @@ Title: "Licenced physician"
Description: "Example of Licensed Physician from CGI Pegasos EHR."
Usage: #example
* active = true
+* id = "practitioner-licensed-physician"
* gender = #male
* identifier[0].system = "urn:oid:1.2.246.537.26"
* identifier[=].use = #official
diff --git a/input/fsh/examples/provenanceCustodianIndividual.fsh b/input/fsh/examples/provenanceCustodianIndividual.fsh
index d4f6403..cd69463 100644
--- a/input/fsh/examples/provenanceCustodianIndividual.fsh
+++ b/input/fsh/examples/provenanceCustodianIndividual.fsh
@@ -10,8 +10,8 @@ Usage: #example
* type
* coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
- * role
- * coding = urn:oid:1.2.246.537.5.40172#2 "Yksityinen"
+ * role[custodianRole]
+ * coding[custodianRoleCoding] = urn:oid:1.2.246.537.5.40172#2 "Yksityinen"
* text = "Yksityinen"
* who
* type = #Practitioner
diff --git a/input/fsh/examples/provenanceCustodianOccupationalHealthcare.fsh b/input/fsh/examples/provenanceCustodianOccupationalHealthcare.fsh
index 0809b62..2c34856 100644
--- a/input/fsh/examples/provenanceCustodianOccupationalHealthcare.fsh
+++ b/input/fsh/examples/provenanceCustodianOccupationalHealthcare.fsh
@@ -10,13 +10,13 @@ Usage: #example
* type
* coding[0] = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
- * role[0]
- * coding[0] = urn:oid:1.2.246.537.5.40172#2 "Yksityinen"
+ * role[custodianRole]
+ * coding[custodianRoleCoding] = urn:oid:1.2.246.537.5.40172#2 "Yksityinen"
* text = "Yksityinen"
* who
* type = #Organization
* identifier
- * type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
* system = "urn:oid:1.2.246.537.6.202"
* value = "urn:oid:1.2.246.10.32515682.10.0"
* display = "Ratinan Terveys Oy"
@@ -31,7 +31,7 @@ Usage: #example
* role = #source
* what
* identifier
- * type = http://terminology.hl7.org/CodeSystem/v2-0203#TAX
+ * type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* system = "urn:oid:1.2.246.10"
* value = "2606155-7"
* display = "Sensotrend Oy"
diff --git a/input/fsh/examples/provenanceCustodianPublicHealthcare.fsh b/input/fsh/examples/provenanceCustodianPublicHealthcare.fsh
index 11a8bef..06b6e45 100644
--- a/input/fsh/examples/provenanceCustodianPublicHealthcare.fsh
+++ b/input/fsh/examples/provenanceCustodianPublicHealthcare.fsh
@@ -10,13 +10,13 @@ Usage: #example
* type
* coding = http://terminology.hl7.org/CodeSystem/v3-ParticipationType#CST "custodian"
* text = "Rekisterinpitäjä"
- * role
- * coding = urn:oid:1.2.246.537.5.40172#1 "Julkinen"
+ * role[custodianRole]
+ * coding[custodianRoleCoding] = urn:oid:1.2.246.537.5.40172#1 "Julkinen"
* text = "Julkinen"
* who
* type = #Organization
* identifier
- * type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
+ * type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
* system = "urn:oid:1.2.246.537.6.40174"
* value = "urn:oid:1.2.246.10.32213086.19.0"
* display = "Pirkanmaan hyvinvointialueen rekisterinpitäjä"
diff --git a/input/fsh/informationCustodian.fsh b/input/fsh/informationCustodian.fsh
index 1275123..2a436e7 100644
--- a/input/fsh/informationCustodian.fsh
+++ b/input/fsh/informationCustodian.fsh
@@ -12,40 +12,68 @@ Description: "This is a Finnish abstract base profile for the Provenance resourc
* ^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 contains custodian 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"
+* agent[custodian].role 1..*
+* agent[custodian].who.identifier 1..1
+* agent[custodian].who.identifier.type 1..1
+* agent[custodian].who.identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
+
+* agent[custodian].role ^slicing.discriminator.type = #value
+* agent[custodian].role ^slicing.discriminator.path = "coding.system"
+* agent[custodian].role ^slicing.rules = #open
+* agent[custodian].role ^slicing.description = "At least one of the roles must have a coding with a system"
+
+* agent[custodian].role contains custodianRole 1..*
+* agent[custodian].role[custodianRole].coding 1..*
+* agent[custodian].role[custodianRole].coding.system 1..1
+
+* agent[custodian].role[custodianRole].coding ^slicing.discriminator.type = #value
+* agent[custodian].role[custodianRole].coding ^slicing.discriminator.path = "system"
+* agent[custodian].role[custodianRole].coding ^slicing.rules = #open
+* agent[custodian].role[custodianRole].coding ^slicing.description = "The information custodian agent SHALL have a role with coding of `system` `urn:oid:1.2.246.537.5.40172` ([*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."
+ * ^definition = "The information custodian agent SHALL have a role with coding of `system` `urn:oid:1.2.246.537.5.40172` ([*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 = "A role with type urn:oid:1.2.246.537.5.40172"
+
+* agent[custodian].role[custodianRole].coding contains custodianRoleCoding 1..*
+
+* agent[custodian].role[custodianRole].coding[custodianRoleCoding].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 1..*
+
* 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 ^slicing.description = "One entity SHALL have the `.role` `source` and a `.what` with an identifier with the system specified."
+ * ^definition = "One entity SHALL have the `.role` `source` and a `.what` with an identifier with the system specified."
+ * ^short = "Role source and a .what with an identifier with the system specified"
+
+* entity contains registerType 1..* and registerSpecifierCompanyId 0..1 and registerSpecifierPersonId 0..1 and registerSpecifierCustomerWithoutId 0..1
-* 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[registerType].what 1..1
+* entity[registerType].what.identifier 1..1
+* entity[registerType].what.identifier.system 1..1
+* entity[registerType].what.identifier.system from FiBaseRegisterIdentifier
+// "One entity SHALL have a `.what` with an identifier with either the system `urn:oid:1.2.246.537.5.40150` (*KanTa-palvelut - Potilasasiakirjan rekisteritunnus*) or the system `urn:oid:1.2.246.537.6.1264` (*Sosiaalihuolto - Asiakirjan rekisteritunnus*)."
+ * ^definition = "One entity SHALL have a `.what` with an identifier with system `urn:oid:1.2.246.537.5.40150` or system `urn:oid:1.2.246.537.6.1264`."
+ * ^short = "Role source and a .what with an identifier with the system urn:oid:1.2.246.537.5.40150 or urn:oid:1.2.246.537.6.1264"
-* 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.type = http://terminology.hl7.org/CodeSystem/v2-0203#XX
* 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."
@@ -56,9 +84,7 @@ 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"
@@ -68,9 +94,7 @@ 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"
@@ -80,9 +104,17 @@ 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"
+
+ValueSet: FiBaseRegisterIdentifier
+Id: fi-base-register-identifier
+Title: "Finnish ValueSet for systems of registry specifiers"
+Description: "This value set contains the systems that can be used to identify the registry specifier for information custodianship."
+* ^experimental = false
+// Code system for register identifiers for patient records:
+* urn:ietf:rfc:3986#urn:oid:1.2.246.537.5.40150 "KanTa-palvelut - Potilasasiakirjan rekisteritunnus"
+// Code system for register identifiers for social care customer records
+* urn:ietf:rfc:3986#urn:oid:1.2.246.537.6.1264 "Sosiaalihuolto - Asiakirjan rekisteritunnus"
diff --git a/input/ignoreWarnings.txt b/input/ignoreWarnings.txt
index 8d40894..f7027b8 100644
--- a/input/ignoreWarnings.txt
+++ b/input/ignoreWarnings.txt
@@ -4,6 +4,9 @@
# (And include comments like this justifying why)
# See https://github.com/FHIR/sample-ig/blob/master/input/ignoreWarnings.txt for examples
+# The validator cannot validate the codes within the Finnish code server.
+Code found in include, however: null
+
# These examples are fake code systems and profile references - they're not expected to be checked
Code System URI 'http://ownSystem.fi/CodeSystem/cs-insulincode' is unknown so the code cannot be validated
Code System URI 'http://terminology.own.com' is unknown so the code cannot be validated
@@ -11,7 +14,6 @@ Code System URI 'http://ownSystem.com/phr-cs-fitnesscategory' is unknown so the
Code System URI 'http://example.oma' is unknown so the code cannot be validated
Profile reference 'http://example.org/StructureDefinition/other-bloodglucose-structuredefinition' has not been checked because it is unknown, and the validator is set to not fetch unknown profiles
-
# Kanta profiles are not included in this guide. It's OK not to validate the Kanta PHR examples imported from the Kanta IGs against them.
Profile reference 'http://phr.kanta.fi/StructureDefinition/fiphr-bloodglucose-stu3' has not been checked because it is unknown, and the validator is set to not fetch unknown profiles
Profile reference 'http://phr.kanta.fi/StructureDefinition/fiphr-sd-bloodglucose' has not been checked because it is unknown, and the validator is set to not fetch unknown profiles
diff --git a/input/pagecontent/Condition-id-for-diagnosis-1-intro.md b/input/pagecontent/Condition-id-for-diagnosis-1-intro.md
index 3a393be..9a70521 100644
--- a/input/pagecontent/Condition-id-for-diagnosis-1-intro.md
+++ b/input/pagecontent/Condition-id-for-diagnosis-1-intro.md
@@ -1,13 +1,11 @@
-### Scope and Usage
+### Identifying that this is a diagnosis
-#### Identifying that this is a diagnosis
-
-This is an example encounter diagnosis (in Finnish called *käyntidiagnoosi*, even for ward periods).
+This is an example encounter diagnosis (*käyntidiagnoosi*, even for ward periods).
`category` code `encounter-diagnosis` communicates that is a diagnosis asserted by a clinician.
-#### No special characters in codes
+### No special characters in codes
-Diagnosis code (reason) is in `code`. Note that in THL - Tautiluokitus ICD-10 this code has CodeId
-H36.03*, but the special character is removed (see `Koodi1`). Evidence code (the symptom) is handled
-similarly.
+Diagnosis code (reason) is in `code`. Note that in THL - Tautiluokitus ICD-10 this code has
+`CodeId` `H36.03*`, but the special character is removed (see `Koodi1`). Evidence code (the
+symptom) is handled similarly.
diff --git a/input/pagecontent/Encounter-id-for-ward-encounter-intro.md b/input/pagecontent/Encounter-id-for-ward-encounter-intro.md
index b2e9cea..fe6dfef 100644
--- a/input/pagecontent/Encounter-id-for-ward-encounter-intro.md
+++ b/input/pagecontent/Encounter-id-for-ward-encounter-intro.md
@@ -1,15 +1,15 @@
-### Scope and Usage
+### How to find a patient in a ward?
-#### How to find a patient in a ward?
-
-Many systems have a need to answer the question: "How to find patients/encounters that are at ward X
-at moment T?".
+Many systems have a need to answer the question: "How to find patients/encounters that are at ward
+X at moment T?".
There are key points to consider when forming the search criteria:
-* We are most likely interested only in `IMP` (inpatient encounter) encounters, so we should filter by `class`.
+* We are most likely interested only in `IMP` (inpatient encounter) encounters, so we should filter
+ by `class`.
* We are interested only in `in-progress` encounters, so we need to filter by `status`.
-* We are most likely interested in querying by organizational hierarchy, the organizational unit (ward) responsible for the patient (not physical location).
+* We are most likely interested in querying by organizational hierarchy, the organizational unit
+ (ward) responsible for the patient (not physical location).
Organizational ward should be communicated using the `serviceProvider` property.
@@ -18,7 +18,7 @@ FHIR request parameters:
* class = `IMP`
* status = `in-progress`
-* period `gt` and `le` -filters as per target moment
+* period `gt` and `le` filters as per target moment
* serviceProvider = id of the ward organization resource
Historically some systems keep the ward encounter active when the patient is sent to ICU. Leaving
@@ -30,16 +30,15 @@ these problems, the encounter SHOULD not be kept `in-progress` when the patient
(if there is a need for "recycling" the ward period encounter, it should be set to `finished` and
then back to `in-progress` upon return from the ICU).
-##### Why not use Location.managingOrganization?
+#### Why not use Location.managingOrganization?
-`Encounter`s `location` -field is a reference to `Location` that has a field
-`managingOrganization`. Use of this to find the organization responsible for the patient is
-problematic. `Location.managingOrganization` might change for different reasons (a room is
-assigned to another organization) and this would have an unexpected effect on the
-responsibility-concern. `Location.managingOrganization` is "too far" from the encounter to be
-useful in this context.
+`Encounter`s `location` field is a reference to `Location` that has a field `managingOrganization`.
+Use of this to find the organization responsible for the patient is problematic.
+`Location.managingOrganization` might change for different reasons (a room is assigned to another
+organization) and this would have an unexpected effect on the responsibility-concern.
+`Location.managingOrganization` is "too far" from the encounter to be useful in this context.
-##### Querying by physical location
+#### Querying by physical location
Querying by location is also an option. Here the focus is on the physical location and not the
organizational responsibility towards the patient.
diff --git a/input/pagecontent/Observation-bloodpressure-max-intro.md b/input/pagecontent/Observation-bloodpressure-max-intro.md
new file mode 100644
index 0000000..aa6e3d9
--- /dev/null
+++ b/input/pagecontent/Observation-bloodpressure-max-intro.md
@@ -0,0 +1,3 @@
+{% include fragment-kanta-phr-warning.md %}
+
+The example has an empty value for `.note.text`.
\ No newline at end of file
diff --git a/input/pagecontent/Observation-example-Bloodpressure-max-intro.md b/input/pagecontent/Observation-example-Bloodpressure-max-intro.md
deleted file mode 100644
index 9ab2cec..0000000
--- a/input/pagecontent/Observation-example-Bloodpressure-max-intro.md
+++ /dev/null
@@ -1,3 +0,0 @@
-{% include fragment-kanta-phr-warning.md %}
-
-The
\ No newline at end of file
diff --git a/input/pagecontent/Provenance-custodian-public-healthcare-kela-intro.md b/input/pagecontent/Provenance-custodian-public-healthcare-kela-intro.md
new file mode 100644
index 0000000..5d4cab8
--- /dev/null
+++ b/input/pagecontent/Provenance-custodian-public-healthcare-kela-intro.md
@@ -0,0 +1,8 @@
+{:.dragon}
+This example has numerous errors. Please see the
+[QA report](file:///Users/mikael/GitHub/finnish-base-profiles/output/qa.html#_Users_mikael_GitHub_finnish-base-profiles_input_examples_provenance_rekpit_containedviittaukset2)
+for a detailed explanation.
+
+This example has been included into the implementation guide to demonstrate how the Provenance
+resource can be used in the way it is planned to be used in Kanta system, still basing the
+implementation on the Finnish base profile definitions.
diff --git a/input/pagecontent/Provenance-id-for-provenance-1-intro.md b/input/pagecontent/Provenance-id-for-provenance-1-intro.md
new file mode 100644
index 0000000..cd39ac2
--- /dev/null
+++ b/input/pagecontent/Provenance-id-for-provenance-1-intro.md
@@ -0,0 +1,8 @@
+{:.dragon}
+This example has numerous errors. Please see the
+[QA report](file:///Users/mikael/GitHub/finnish-base-profiles/output/qa.html#_Users_mikael_GitHub_finnish-base-profiles_input_examples_VIRHE2_KELABASELISAYKSET-Provenance-custodian-public-healthcare)
+for a detailed explanation.
+
+This example has been included into the implementation guide to demonstrate how the Provenance
+resource can be used in the way it is planned to be used in Kanta system, still basing the
+implementation on the Finnish base profile definitions.
diff --git a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md
index 0a3a53a..252c0a9 100644
--- a/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md
+++ b/input/pagecontent/StructureDefinition-fi-base-encounter-intro.md
@@ -10,22 +10,26 @@ Kanta registry. As such the profile should be usable in most Finnish contexts.
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).
+The scope of *palvelutapahtuma* is described in
+[Kanta documentation](https://www.kanta.fi/jarjestelmakehittajat/liite-2-palvelutapahtumien-esimerkkeja)
+(in Finnish). It's scope is not always the same as the 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, see (in Finnish):
-* Kanta [CDA R2 Header](https://www.kanta.fi/jarjestelmakehittajat/potilastiedon-arkiston-cda-r2-header) version 4.66 or later.
- * Descriptions of *palvelutapahtuma*
-* Kanta [HL7 V3 Medical Records specification](https://www.kanta.fi/jarjestelmakehittajat/potilastiedon-arkiston-medical-records).
- * Shows the role of *palvelutapahtuma* when making requests to Kanta
+* Kanta
+[CDA R2 Header](https://www.kanta.fi/jarjestelmakehittajat/potilastiedon-arkiston-cda-r2-header)
+version 4.66 or later.
+ * Descriptions of *palvelutapahtuma*
+* Kanta
+[HL7 V3 Medical Records specification](https://www.kanta.fi/jarjestelmakehittajat/potilastiedon-arkiston-medical-records).
+ * Shows the role of *palvelutapahtuma* when making requests to Kanta
-##### Why does encounter need this information?
+##### Why does an 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
@@ -34,8 +38,8 @@ 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
-resource.
+context. Laboratory system can resolve *palvelutapahtuma*'s OID identifier by fetching the
+encounter resource.
##### How to communicate palvelutapahtuma via FHIR encounter?
@@ -44,11 +48,11 @@ representing a *palvelutapahtuma*, but is a lower level encounter (some systems
*prosessitapahtuma*), `partOf` should be used to point to upper level encounter (up until
*palvelutapahtuma* level is reached).
-A *palvelutapahtuma* encounter is identified by identifier. When encounter has an identifier with
-`use=official` it is considered to be a *palvelutapahtuma* and that identifier SHALL be the
+A *palvelutapahtuma* encounter is identified by an identifier. When encounter has an identifier
+with `use=official` it is considered to be a *palvelutapahtuma* and that identifier SHALL be the
OID of a *palvelutapahtuma*.
-Other levels of encounter that are not a *palvelutapahtuma*, MUST NOT contain an ientifier with
+Other levels of encounter that are not a *palvelutapahtuma*, MUST NOT contain an identifier with
`use=official`.
#### Organizational responsibility
diff --git a/input/pagecontent/StructureDefinition-fi-base-reason-for-care-intro.md b/input/pagecontent/StructureDefinition-fi-base-reason-for-care-intro.md
index cc04b82..266f4b7 100644
--- a/input/pagecontent/StructureDefinition-fi-base-reason-for-care-intro.md
+++ b/input/pagecontent/StructureDefinition-fi-base-reason-for-care-intro.md
@@ -5,9 +5,9 @@ href="#further-development-needs">further development needs below.
### Scope and Usage
-This profile describes Diagnosis -based conditions and Finnish *kayntisyy*.
+This profile describes Diagnosis based conditions and Finnish *kayntisyy*.
These are `Condition` resources that are asserted by a healthcare professional and directly related
-to encounters. This profile does not describe how to communicate `problem-list-item` -level conditions.
+to encounters. This profile does not describe how to communicate `problem-list-item` level conditions.
THL has a data model for Finnish diagnosis (including *käyntisyy*) in code server:
[THL/Tietosisältö - Diagnoosit](https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=543&versionKey=1543)
@@ -19,7 +19,7 @@ For high level documentation, see
This profile SHOULD NOT be used to describe reason given by patient for requesting/acquiring
healthcare service. Finnish *tulosyy*.
-#### Separating between Diagnosis -based conditions and Finnish *käyntisyy*
+#### Separating between Diagnosis based conditions and Finnish *käyntisyy*
Reason for care may be a diagnosis asserted by a clinician / medical doctor or some other reason
for visit that is asserted by an nurse or some other healthcare professional.
diff --git a/sushi-config.yaml b/sushi-config.yaml
index 72c3854..529312b 100644
--- a/sushi-config.yaml
+++ b/sushi-config.yaml
@@ -189,7 +189,7 @@ resources:
exampleCanonical: https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/fi-base-observation
Organization/1.2.246.10.31045308.10002.0:
name: A high level organization
- description: SOTE-toimintayksikko -level organization
+ description: Organization on Wellbeing Services County level
exampleCanonical: https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/fi-base-organization
Organization/organizationesim1:
name: Testi terveysasema
@@ -247,6 +247,10 @@ resources:
name: A dummy patient entry
description: A patient id supporting other examples, not included in the guide.
exampleBoolean: false
+ Provenance/custodian-public-healthcare-kela:
+ name: Provenance example for Kanta
+ description: This example resource shows how information custodianship can be implemented with the support of the Finnish base profiles. It is derived from a provided example.
+ exampleCanonical: https://hl7.fi/fhir/finnish-base-profiles/StructureDefinition/kanta-document-metadata-profile
pages:
index.md: