Inera Core Implementation Guide
0.2.0 - ci-build Sweden

Inera Core Implementation Guide - Local Development build (v0.2.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: ConceptMap GetCarePlan TKB to FHIR DocumentReference - TTL Representation

Draft as of 2026-01-09

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:ConceptMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "ConceptMapGetCarePlanTKBToDocumentReference"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: ConceptMap ConceptMapGetCarePlanTKBToDocumentReference</b></p><a name=\"ConceptMapGetCarePlanTKBToDocumentReference\"> </a><a name=\"hcConceptMapGetCarePlanTKBToDocumentReference\"> </a><p>Mapping from https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2 to <a href=\"http://hl7.org/fhir/R4/documentreference.html\">DocumentReference</a></p><br/><p><b>Group 1 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2</code> to <a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></p><table class=\"grid\"><tr><td><b>Source Code</b></td><td><b>Relationship</b></td><td><b>Target Code</b></td><td><b>Comment</b></td></tr><tr><td>patientId (Patient ID (personnummer/samordningsnummer/reservnummer))</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Query parameter: GET /DocumentReference?subject=Patient/191212121212&amp;type=care-plan</td></tr><tr><td>careUnitHSAId (Care unit HSA-ID filter)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Query parameter: GET /DocumentReference?custodian=Organization/{hsaid}</td></tr><tr><td>datePeriod (Date period for document creation)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Query parameter: GET /DocumentReference?date=ge2024-01-01&amp;date=le2024-12-31</td></tr><tr><td>sourceSystemHSAId</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Query parameter: GET /DocumentReference?custodian.identifier={hsaid}</td></tr><tr><td>careContactId (Care contact ID filter)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Query parameter: GET /DocumentReference?context=Encounter/{careContactId}</td></tr></table><hr/><p><b>Group 2 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2</code> to <a href=\"http://hl7.org/fhir/R4/documentreference.html\">DocumentReference</a></p><table class=\"grid\"><tr><td><b>Source Code</b></td><td><b>Relationship</b></td><td><b>Target Code</b></td><td><b>Comment</b></td></tr><tr><td>carePlan.carePlanHeader.documentId (Document ID (care plan identifier))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>masterIdentifier</td><td>Unique identifier for the care plan document, stable across versions</td></tr><tr><td>carePlan.carePlanHeader.documentTitle (Document title (care plan heading))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>description</td><td>Descriptive title for the care plan (e.g., 'Samordnad vårdplanering', 'Rehabiliteringsplan')</td></tr><tr><td>carePlan.carePlanHeader.documentTime (Document creation time)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>date</td><td>When the care plan document was created</td></tr><tr><td>carePlan.carePlanHeader.patientId (Patient ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>subject</td><td>Reference to Patient resource with Swedish national identifier</td></tr><tr><td>carePlan.carePlanHeader.accountableHealthcareProfessional (Accountable healthcare professional (care plan author))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>author</td><td>Reference to PractitionerRole for the healthcare professional responsible for the care plan</td></tr><tr><td>carePlan.carePlanHeader.legalAuthenticator (Legal authenticator (signer))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>authenticator</td><td>Reference to Practitioner who signed the care plan document</td></tr><tr><td>carePlan.carePlanHeader.approvedForPatient (Approved for patient viewing (direktåtkomst))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#relatedto\" title=\"relatedto\">is related to</a></td><td>securityLabel</td><td>If false, add security label to restrict patient portal access. Use SNOMED CT code or custom extension</td></tr><tr><td>carePlan.carePlanHeader.careContactId (Care contact ID (triggering encounter))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>context.encounter</td><td>Reference to Encounter that prompted the care plan creation</td></tr><tr><td>carePlan.carePlanHeader.sourceSystemHSAId (Source system HSA-ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>custodian</td><td>Reference to Organization (source system) that maintains the document</td></tr><tr><td>carePlan.carePlanBody.typeOfCarePlan (Type of care plan (SIP, VP, HP, RP, etc.))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>type</td><td>CodeableConcept for care plan type: SIP, SPLPTLRV, SPU, VP, HP, RP, GP, SVP. Use Swedish care plan terminology</td></tr><tr><td>carePlan.carePlanBody.content (Care plan content (document attachments))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>content</td><td>Array of attachments with content.attachment elements. Each TKB content maps to one FHIR content element</td></tr><tr><td>carePlan.carePlanBody.content.mediaType (Media type (MIME type))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>content.attachment.contentType</td><td>MIME type: text/plain, text/html, image/png, image/jpeg, image/tiff, application/pdf</td></tr><tr><td>carePlan.carePlanBody.content.value (Inline binary data (base64))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>content.attachment.data</td><td>Base64-encoded binary data. Use when content is embedded inline</td></tr><tr><td>carePlan.carePlanBody.content.reference (External reference (URL))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>content.attachment.url</td><td>URL to external binary file. Use when content is stored externally</td></tr><tr><td>carePlan.carePlanBody.participatingCareUnitHSAId (Participating care units (HSA-IDs))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#relatedto\" title=\"relatedto\">is related to</a></td><td>context.related</td><td>Array of Organization references for participating care units. Use context.related or custom extension</td></tr><tr><td>carePlan.status (Document status (implicit from TKB))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>status</td><td>DocumentReference.status: current (if active), superseded (if replaced), entered-in-error (if nullified)</td></tr><tr><td>carePlan.category (Document category (care plan))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>category</td><td>Use LOINC code for care plan documents or Swedish care plan category codes</td></tr></table><hr/><p><b>Group 3 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2</code> to <a href=\"http://hl7.org/fhir/R4/provenance.html\">Provenance</a></p><table class=\"grid\"><tr><td><b>Source Code</b></td><td><b>Relationship</b></td><td><b>Target Code</b></td><td><b>Comment</b></td></tr><tr><td>carePlan.carePlanHeader.sourceSystemHSAId (Source system HSA-ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>entity.what</td><td>Provenance.entity.what references Device with HSA-ID. Provenance.entity.role = source</td></tr><tr><td>carePlan.carePlanHeader.accountableHealthcareProfessional.authorTime (Author time (registration time))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>recorded</td><td>When the care plan was documented/registered in the source system</td></tr><tr><td>carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalHSAId (Author HSA-ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>agent.who</td><td>Provenance.agent.who references PractitionerRole with type=author/documenter</td></tr><tr><td>carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalcareUnitHSAId (Author's care unit HSA-ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>agent.onBehalfOf</td><td>Provenance.agent.onBehalfOf references Organization (care unit)</td></tr><tr><td>carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalcareGiverHSAId (Care giver HSA-ID (vårdgivare))</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>entity.what</td><td>Provenance.entity.what references Organization (care giver) for organizational hierarchy</td></tr><tr><td>carePlan.carePlanHeader.legalAuthenticator.signatureTime (Signature time)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>signature.when</td><td>When the care plan document was signed</td></tr><tr><td>carePlan.carePlanHeader.legalAuthenticator.legalAuthenticatorHSAId (Signer HSA-ID)</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td>signature.who</td><td>Provenance.signature.who references Practitioner who signed the document</td></tr></table><hr/><p><b>Group 4 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2</code> to <a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></p><table class=\"grid\"><tr><td><b>Source Code</b></td><td><b>Relationship</b></td><td><b>Target Code</b></td><td><b>Comment</b></td></tr><tr><td>result.resultCode (Result code (OK, INFO, ERROR))</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Maps to Bundle.entry.response.status or OperationOutcome for errors</td></tr><tr><td>result.errorCode (Error code)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">Maps to OperationOutcome.issue.code when resultCode=ERROR</td></tr><tr><td>result.logId (Log ID (UUID for troubleshooting))</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">UUID for error tracking. Can be included in OperationOutcome.issue.diagnostics</td></tr><tr><td>result.message (Result message)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">User-facing message. Maps to OperationOutcome.issue.diagnostics</td></tr><tr><td>result.subcode (Result subcode (not specified))</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">No subcodes defined in this version. Reserved for future use</td></tr></table></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:url [
fhir:v "https://inera.se/fhir/core/ConceptMap/getcareplan-tkb-to-documentreference"^^xsd:anyURI ;
fhir:l <https://inera.se/fhir/core/ConceptMap/getcareplan-tkb-to-documentreference>
  ] ; # 
  fhir:version [ fhir:v "0.2.0"] ; # 
  fhir:name [ fhir:v "ConceptMapGetCarePlanTKBToDocumentReference"] ; # 
  fhir:title [ fhir:v "ConceptMap GetCarePlan TKB to FHIR DocumentReference"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v true] ; # 
  fhir:date [ fhir:v "2026-01-09"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "Inera AB"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "Inera AB" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://www.inera.se" ]     ] [
fhir:system [ fhir:v "email" ] ;
fhir:value [ fhir:v "info@inera.se" ]     ] )
  ] [
fhir:name [ fhir:v "Inera AB" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://www.inera.se" ]     ] [
fhir:system [ fhir:v "email" ] ;
fhir:value [ fhir:v "info@inera.se" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Mapping from GetCarePlan v2.0 TKB service to FHIR DocumentReference and Provenance resources.\n\n**TKB Service**: GetCarePlan v2.0  \n**TKB Domain**: clinicalprocess:logistics:logistics v2\n**Logical Model**: GetcareplansResponseLM\n**FHIR Resources**: DocumentReference (primary), Provenance (metadata)\n\n**Mapping Coverage**:\n- ✅ Header metadata: 15+ elements (document ID, title, patient, author, signer, care contact)\n- ✅ Document content: Multiple attachments with mediaType (text/plain, text/html, image/png, image/jpeg, image/tiff, application/pdf)\n- ✅ Plan metadata: Type of care plan (SIP, SPLPTLRV, SPU, VP, HP, RP, GP, SVP), participating care units\n- ✅ Access control: approvedForPatient flag for patient portal visibility\n\n**Care Plan Types** (typeOfCarePlan):\n- SIP - Samordnad individuell plan (Coordinated individual plan)\n- SPLPTLRV - Samordnad plan enligt LPT eller LRV (Coordinated plan according to Mental Health Act)\n- SPU - Samordnad plan vid utskrivning (Coordinated discharge plan)\n- VP - Vårdplan (Care plan)\n- HP - Habiliteringsplan (Habilitation plan)\n- RP - Rehabiliteringsplan (Rehabilitation plan)\n- GP - Genomförandeplan (Implementation plan)\n- SVP - Standardiserad vårdplan (Standardized care plan)"] ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [
fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ;
fhir:l <urn:iso:std:iso:3166>       ] ;
fhir:code [ fhir:v "SE" ] ;
fhir:display [ fhir:v "Sweden" ]     ] )
  ] ) ; # 
  fhir:source [
a fhir:Uri ;
fhir:v "https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2"^^xsd:anyURI ;
fhir:l <https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2>
  ] ; # 
  fhir:target [
a fhir:Canonical ;
fhir:v "http://hl7.org/fhir/StructureDefinition/DocumentReference"^^xsd:anyURI ;
fhir:l <http://hl7.org/fhir/StructureDefinition/DocumentReference>
  ] ; # 
  fhir:group ( [
fhir:source [
fhir:v "https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2"^^xsd:anyURI ;
fhir:l <https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2>     ] ;
fhir:target [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:l <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
    ( fhir:element [
fhir:code [ fhir:v "patientId" ] ;
fhir:display [ fhir:v "Patient ID (personnummer/samordningsnummer/reservnummer)" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Query parameter: GET /DocumentReference?subject=Patient/191212121212&type=care-plan" ]       ] )     ] [
fhir:code [ fhir:v "careUnitHSAId" ] ;
fhir:display [ fhir:v "Care unit HSA-ID filter" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Query parameter: GET /DocumentReference?custodian=Organization/{hsaid}" ]       ] )     ] [
fhir:code [ fhir:v "datePeriod" ] ;
fhir:display [ fhir:v "Date period for document creation" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Query parameter: GET /DocumentReference?date=ge2024-01-01&date=le2024-12-31" ]       ] )     ] [
fhir:code [ fhir:v "sourceSystemHSAId" ] ;
fhir:display [ fhir:v "Source system HSA-ID" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Query parameter: GET /DocumentReference?custodian.identifier={hsaid}" ]       ] )     ] [
fhir:code [ fhir:v "careContactId" ] ;
fhir:display [ fhir:v "Care contact ID filter" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Query parameter: GET /DocumentReference?context=Encounter/{careContactId}" ]       ] )     ] )
  ] [
fhir:source [
fhir:v "https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2"^^xsd:anyURI ;
fhir:l <https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2>     ] ;
fhir:target [
fhir:v "http://hl7.org/fhir/StructureDefinition/DocumentReference"^^xsd:anyURI ;
fhir:l <http://hl7.org/fhir/StructureDefinition/DocumentReference>     ] ;
    ( fhir:element [
fhir:code [ fhir:v "carePlan.carePlanHeader.documentId" ] ;
fhir:display [ fhir:v "Document ID (care plan identifier)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "masterIdentifier" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Unique identifier for the care plan document, stable across versions" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.documentTitle" ] ;
fhir:display [ fhir:v "Document title (care plan heading)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "description" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Descriptive title for the care plan (e.g., 'Samordnad vårdplanering', 'Rehabiliteringsplan')" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.documentTime" ] ;
fhir:display [ fhir:v "Document creation time" ] ;
      ( fhir:target [
fhir:code [ fhir:v "date" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "When the care plan document was created" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.patientId" ] ;
fhir:display [ fhir:v "Patient ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "subject" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Reference to Patient resource with Swedish national identifier" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.accountableHealthcareProfessional" ] ;
fhir:display [ fhir:v "Accountable healthcare professional (care plan author)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "author" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Reference to PractitionerRole for the healthcare professional responsible for the care plan" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.legalAuthenticator" ] ;
fhir:display [ fhir:v "Legal authenticator (signer)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "authenticator" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Reference to Practitioner who signed the care plan document" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.approvedForPatient" ] ;
fhir:display [ fhir:v "Approved for patient viewing (direktåtkomst)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "securityLabel" ] ;
fhir:equivalence [ fhir:v "relatedto" ] ;
fhir:comment [ fhir:v "If false, add security label to restrict patient portal access. Use SNOMED CT code or custom extension" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.careContactId" ] ;
fhir:display [ fhir:v "Care contact ID (triggering encounter)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "context.encounter" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Reference to Encounter that prompted the care plan creation" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.sourceSystemHSAId" ] ;
fhir:display [ fhir:v "Source system HSA-ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "custodian" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Reference to Organization (source system) that maintains the document" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.typeOfCarePlan" ] ;
fhir:display [ fhir:v "Type of care plan (SIP, VP, HP, RP, etc.)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "type" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "CodeableConcept for care plan type: SIP, SPLPTLRV, SPU, VP, HP, RP, GP, SVP. Use Swedish care plan terminology" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.content" ] ;
fhir:display [ fhir:v "Care plan content (document attachments)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "content" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Array of attachments with content.attachment elements. Each TKB content maps to one FHIR content element" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.content.mediaType" ] ;
fhir:display [ fhir:v "Media type (MIME type)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "content.attachment.contentType" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "MIME type: text/plain, text/html, image/png, image/jpeg, image/tiff, application/pdf" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.content.value" ] ;
fhir:display [ fhir:v "Inline binary data (base64)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "content.attachment.data" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Base64-encoded binary data. Use when content is embedded inline" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.content.reference" ] ;
fhir:display [ fhir:v "External reference (URL)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "content.attachment.url" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "URL to external binary file. Use when content is stored externally" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanBody.participatingCareUnitHSAId" ] ;
fhir:display [ fhir:v "Participating care units (HSA-IDs)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "context.related" ] ;
fhir:equivalence [ fhir:v "relatedto" ] ;
fhir:comment [ fhir:v "Array of Organization references for participating care units. Use context.related or custom extension" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.status" ] ;
fhir:display [ fhir:v "Document status (implicit from TKB)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "status" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "DocumentReference.status: current (if active), superseded (if replaced), entered-in-error (if nullified)" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.category" ] ;
fhir:display [ fhir:v "Document category (care plan)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "category" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Use LOINC code for care plan documents or Swedish care plan category codes" ]       ] )     ] )
  ] [
fhir:source [
fhir:v "https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2"^^xsd:anyURI ;
fhir:l <https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2>     ] ;
fhir:target [
fhir:v "http://hl7.org/fhir/StructureDefinition/Provenance"^^xsd:anyURI ;
fhir:l <http://hl7.org/fhir/StructureDefinition/Provenance>     ] ;
    ( fhir:element [
fhir:code [ fhir:v "carePlan.carePlanHeader.sourceSystemHSAId" ] ;
fhir:display [ fhir:v "Source system HSA-ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "entity.what" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Provenance.entity.what references Device with HSA-ID. Provenance.entity.role = source" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.accountableHealthcareProfessional.authorTime" ] ;
fhir:display [ fhir:v "Author time (registration time)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "recorded" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "When the care plan was documented/registered in the source system" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalHSAId" ] ;
fhir:display [ fhir:v "Author HSA-ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "agent.who" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Provenance.agent.who references PractitionerRole with type=author/documenter" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalcareUnitHSAId" ] ;
fhir:display [ fhir:v "Author's care unit HSA-ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "agent.onBehalfOf" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Provenance.agent.onBehalfOf references Organization (care unit)" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.accountableHealthcareProfessional.healthcareProfessionalcareGiverHSAId" ] ;
fhir:display [ fhir:v "Care giver HSA-ID (vårdgivare)" ] ;
      ( fhir:target [
fhir:code [ fhir:v "entity.what" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Provenance.entity.what references Organization (care giver) for organizational hierarchy" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.legalAuthenticator.signatureTime" ] ;
fhir:display [ fhir:v "Signature time" ] ;
      ( fhir:target [
fhir:code [ fhir:v "signature.when" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "When the care plan document was signed" ]       ] )     ] [
fhir:code [ fhir:v "carePlan.carePlanHeader.legalAuthenticator.legalAuthenticatorHSAId" ] ;
fhir:display [ fhir:v "Signer HSA-ID" ] ;
      ( fhir:target [
fhir:code [ fhir:v "signature.who" ] ;
fhir:equivalence [ fhir:v "equivalent" ] ;
fhir:comment [ fhir:v "Provenance.signature.who references Practitioner who signed the document" ]       ] )     ] )
  ] [
fhir:source [
fhir:v "https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2"^^xsd:anyURI ;
fhir:l <https://rivta.se/domains/clinicalprocess/logistics/logistics/GetCarePlansResponder/2>     ] ;
fhir:target [
fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
fhir:l <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
    ( fhir:element [
fhir:code [ fhir:v "result.resultCode" ] ;
fhir:display [ fhir:v "Result code (OK, INFO, ERROR)" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Maps to Bundle.entry.response.status or OperationOutcome for errors" ]       ] )     ] [
fhir:code [ fhir:v "result.errorCode" ] ;
fhir:display [ fhir:v "Error code" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "Maps to OperationOutcome.issue.code when resultCode=ERROR" ]       ] )     ] [
fhir:code [ fhir:v "result.logId" ] ;
fhir:display [ fhir:v "Log ID (UUID for troubleshooting)" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "UUID for error tracking. Can be included in OperationOutcome.issue.diagnostics" ]       ] )     ] [
fhir:code [ fhir:v "result.message" ] ;
fhir:display [ fhir:v "Result message" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "User-facing message. Maps to OperationOutcome.issue.diagnostics" ]       ] )     ] [
fhir:code [ fhir:v "result.subcode" ] ;
fhir:display [ fhir:v "Result subcode (not specified)" ] ;
      ( fhir:target [
fhir:equivalence [ fhir:v "unmatched" ] ;
fhir:comment [ fhir:v "No subcodes defined in this version. Reserved for future use" ]       ] )     ] )
  ] ) . #