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 GetAlertInformation TKB to FHIR AllergyIntolerance/Flag - XML Representation

Draft as of 2025-11-24

Raw xml | Download


<ConceptMap xmlns="http://hl7.org/fhir">
  <id value="ConceptMapGetAlertInformationTKBToAllergyIntolerance"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: ConceptMap ConceptMapGetAlertInformationTKBToAllergyIntolerance</b></p><a name="ConceptMapGetAlertInformationTKBToAllergyIntolerance"> </a><a name="hcConceptMapGetAlertInformationTKBToAllergyIntolerance"> </a><p>Mapping from https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2 to <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a></p><br/><p><b>Group 1 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/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 (Query parameter: Patient ID filter)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED. Used as search parameter: GET /AllergyIntolerance?patient=Patient/191212121212</td></tr><tr><td>alertType (Query parameter: Filter by alert type)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED. Filter by alert type (pharmaceutical hypersensitivity, serious disease, etc.). Used to route to AllergyIntolerance vs Flag resources.</td></tr></table><hr/><p><b>Group 2 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2</code> to <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</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>alertInformation.alertInformationHeader.documentId (Alert ID (unique business identifier))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>identifier</td><td>Unique alert identifier within source system. System derived from sourceSystemHSAid.</td></tr><tr><td>alertInformation.alertInformationHeader.patientId (Patient ID (personnummer/samordningsnummer))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>patient</td><td>Reference to Patient with Swedish national identifier. OID 1.2.752.129.2.1.3.1 (personnummer), 1.2.752.129.2.1.3.3 (samordningsnummer)</td></tr><tr><td>alertInformation.alertInformationHeader.approvedForPatient (Approved for patient access (true/false))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>meta.security</td><td>If false, add security label NOPATIENT to restrict patient access (menprövningsflagga).</td></tr><tr><td>alertInformation.alertInformationBody.typeOfAlertInformation (Type of alert (Läkemedelsöverkänslighet))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>type</td><td>Swedish alert type → FHIR AllergyIntolerance.type (allergy|intolerance). Only pharmaceutical hypersensitivity maps here. Other types use Flag resource.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.typeOfHypersensitivity (Type of hypersensitivity (medication, food, environment))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>category</td><td>Swedish hypersensitivity type (KV Typ av överkänslighet OID 1.2.752.129.2.2.3.10) → FHIR category: medication|food|environment|biologic. Requires ConceptMap.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.degreeOfSeverity (Degree of severity)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>criticality</td><td>Swedish severity codes (KV Allvarlighetsgrad OID 1.2.752.129.2.2.3.3) → FHIR criticality: low|high|unable-to-assess. Lindrig/Måttlig→low, Svår/Livshotande→high.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.degreeOfCertainty (Degree of certainty/verification)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>verificationStatus</td><td>Swedish certainty codes (KV Visshetsgrad OID 1.2.752.129.2.2.3.11) → FHIR verificationStatus: unconfirmed|presumed|confirmed|refuted. Requires ConceptMap.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance (ATC substance code)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code</td><td>ATC code for pharmaceutical substance. System: http://www.whocc.no/atc or Swedish ATC (OID 1.2.752.129.2.2.3.1.1). code.coding.code + code.coding.display.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance.code (ATC code value)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code.coding.code</td><td>ATC code (e.g., N02BE01 for paracetamol). System: http://www.whocc.no/atc</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance.displayName (Substance name)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code.coding.display</td><td>Substance display name (e.g., 'Paracetamol')</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.nonAtcSubstance (Non-ATC substance description)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code.text</td><td>Free text description when ATC code not available. Use code.text.</td></tr><tr><td>alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.pharmaceuticalProductId (NPL product ID)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>code.coding</td><td>NPL (Nordic Pharmaceutical List) ID. System: OID 1.2.752.129.2.1.5.1. Add as additional coding alongside ATC.</td></tr><tr><td>alertInformation.alertInformationBody.alertInformationComment (Comment/description of reaction)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>reaction.description</td><td>Free text description of observed reaction. For coded reactions, use reaction.manifestation with SNOMED CT codes.</td></tr><tr><td>alertInformation.alertInformationBody.ascertainedDate (Date when hypersensitivity was ascertained)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>onsetDateTime</td><td>When the allergy/intolerance was first identified or occurred.</td></tr><tr><td>alertInformation.alertInformationBody.verifiedTime (Verification timestamp)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>recordedDate</td><td>When the allergy was verified/recorded in the system. Also in Provenance.recorded.</td></tr><tr><td>alertInformation.alertInformationBody.validityTimePeriod.start (Validity period start)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>onsetDateTime</td><td>Start of validity period for the alert.</td></tr><tr><td>alertInformation.alertInformationBody.validityTimePeriod.end (Validity period end)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>lastOccurrence</td><td>End of validity. If ended, may also set clinicalStatus=inactive or resolved.</td></tr><tr><td>alertInformation.alertInformationBody.obsoleteTime (Time when alert became obsolete)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>clinicalStatus</td><td>If obsoleteTime is set, clinicalStatus=inactive or resolved. Store actual obsolete timestamp in Provenance.recorded with activity=UPDATE describing status change.</td></tr><tr><td>alertInformation.alertInformationHeader.nullified (Alert nullified flag)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>verificationStatus</td><td>If nullified=true, set verificationStatus=entered-in-error. Store nullifiedReason in Provenance.</td></tr></table><hr/><p><b>Group 3 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2</code> to <a href="http://hl7.org/fhir/R4/flag.html">Flag</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>alertInformation.alertInformationHeader.documentId (Alert ID)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>identifier</td><td>Unique alert identifier for non-pharmaceutical alerts.</td></tr><tr><td>alertInformation.alertInformationHeader.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.</td></tr><tr><td>alertInformation.alertInformationHeader.approvedForPatient (Approved for patient access)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>meta.security</td><td>If false, add security label NOPATIENT.</td></tr><tr><td>alertInformation.alertInformationBody.typeOfAlertInformation (Type of alert (Allvarlig sjukdom, Behandlingsvarning, etc.))</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>category</td><td>Swedish alert type → Flag.category. Use Swedish CodeSystem or map to FHIR flag-category codes: safety|infection|drug|behavioral|etc.</td></tr><tr><td>alertInformation.alertInformationBody.seriousDisease (Serious disease information)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code</td><td>Coded serious disease (e.g., bleeding disorder, infectious disease). Use SNOMED CT or ICD-10-SE codes.</td></tr><tr><td>alertInformation.alertInformationBody.treatmentWarning (Treatment warning)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code</td><td>Treatment warning information. Code and text description.</td></tr><tr><td>alertInformation.alertInformationBody.communicableDisease (Communicable disease)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code</td><td>Communicable disease alert. Use infectious disease codes.</td></tr><tr><td>alertInformation.alertInformationBody.restrictionOfCare (Restriction of care)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code</td><td>Care restriction information (e.g., DNR, treatment limitations).</td></tr><tr><td>alertInformation.alertInformationBody.unstructuredAlertInformation (Unstructured alert information)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code.text</td><td>Free text alert when structured data not available.</td></tr><tr><td>alertInformation.alertInformationBody.validityTimePeriod (Validity time period)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>period</td><td>When the flag/alert is valid. period.start and period.end.</td></tr><tr><td>alertInformation.alertInformationBody.obsoleteTime (Obsolete time)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#wider" title="wider">maps to wider concept</a></td><td>status</td><td>If obsoleteTime set, status=inactive. Otherwise status=active. FHIR status: active|inactive|entered-in-error.</td></tr><tr><td>alertInformation.alertInformationBody.alertInformationComment (Alert comment)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent" title="equivalent">is equivalent to</a></td><td>code.text</td><td>Additional comment/description. Use code.text for brief comment or Flag.note for longer narrative.</td></tr></table><hr/><p><b>Group 4 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/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>alertInformation.alertInformationHeader.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>HSA-ID of source system. Also mapped to AllergyIntolerance/Flag.meta.source as https://hsaid.se/{HSA-ID}. Provenance.entity.role=source.</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.authorTime (Author time (registration timestamp))</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 alert was recorded. Also in AllergyIntolerance.recordedDate.</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalHSAid (Healthcare professional 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>Reference to Practitioner with HSA-ID. Provenance.agent.type=author. Also in AllergyIntolerance.recorder.</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalName (Healthcare professional name)</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.display</td><td>Display name. Full Practitioner resource should have structured name.</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalRoleCode (Healthcare professional role/befattning)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#relatedto" title="relatedto">is related to</a></td><td>agent.role</td><td>Professional role (befattning). Use KV Befattning (OID 1.2.752.129.2.2.1.4).</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalOrgUnit (Organization unit)</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>Reference to Organization (organizational unit).</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalCareUnitHSAid (Care unit HSA-ID (vårdenhet))</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>HSA-ID for care unit. Reference to Organization. Part of PDL hierarchy.</td></tr><tr><td>alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalCareGiverHSAid (Care provider 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>HSA-ID for care provider. Top-level organization in PDL hierarchy.</td></tr><tr><td>alertInformation.alertInformationHeader.legalAuthenticator.signatureTime (Signature timestamp)</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 alert was digitally signed (if applicable).</td></tr><tr><td>alertInformation.alertInformationHeader.legalAuthenticator.legalAuthenticatorHSAid (Legal authenticator 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>Reference to Practitioner who signed alert. Provenance.agent.type=legal.</td></tr><tr><td>alertInformation.alertInformationHeader.nullifiedReason (Reason for nullification)</td><td><a href="http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#relatedto" title="relatedto">is related to</a></td><td>reason</td><td>Why alert was nullified. Store in Provenance.reason when verificationStatus=entered-in-error.</td></tr></table><hr/><p><b>Group 5 </b>Mapping from <code>https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/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>alertInformation.alertInformationHeader.documentTitle (Document title)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED. Cardinality 0..0 for GetAlertInformation.</td></tr><tr><td>alertInformation.alertInformationHeader.documentTime (Document time)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED. Cardinality 0..0 for GetAlertInformation. Use authorTime or verifiedTime instead.</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">NOT MAPPED to resources. HTTP status: OK→200, INFO→200 with warnings, ERROR→4xx/5xx.</td></tr><tr><td>result.errorCode (Error code)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED to resources. Use in 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">NOT MAPPED to resources. Use in OperationOutcome.issue.diagnostics or X-Request-Id header.</td></tr><tr><td>result.message (Result message)</td><td colspan="2" style="background-color: #efefef">(not mapped)</td><td style="background-color: #efefef">NOT MAPPED to resources. User-facing message in OperationOutcome.issue.diagnostics.</td></tr></table></div>
  </text>
  <url
       value="https://inera.se/fhir/core/ConceptMap/getalertinformation-tkb-to-allergyintolerance"/>
  <version value="0.2.0"/>
  <name value="ConceptMapGetAlertInformationTKBToAllergyIntolerance"/>
  <title
         value="ConceptMap GetAlertInformation TKB to FHIR AllergyIntolerance/Flag"/>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2025-11-24"/>
  <publisher value="Inera AB"/>
  <contact>
    <name value="Inera AB"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.inera.se"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@inera.se"/>
    </telecom>
  </contact>
  <contact>
    <name value="Inera AB"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.inera.se"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@inera.se"/>
    </telecom>
  </contact>
  <description
               value="Complete mapping from GetAlertInformation TKB service to FHIR AllergyIntolerance and Flag resources"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="SE"/>
      <display value="Sweden"/>
    </coding>
  </jurisdiction>
  <sourceUri
             value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
  <targetCanonical
                   value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
  <group>
    <source
            value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
    <target value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <element>
      <code value="patientId"/>
      <display value="Query parameter: Patient ID filter"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED. Used as search parameter: GET /AllergyIntolerance?patient=Patient/191212121212"/>
      </target>
    </element>
    <element>
      <code value="alertType"/>
      <display value="Query parameter: Filter by alert type"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED. Filter by alert type (pharmaceutical hypersensitivity, serious disease, etc.). Used to route to AllergyIntolerance vs Flag resources."/>
      </target>
    </element>
  </group>
  <group>
    <source
            value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
    <target
            value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
    <element>
      <code value="alertInformation.alertInformationHeader.documentId"/>
      <display value="Alert ID (unique business identifier)"/>
      <target>
        <code value="identifier"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Unique alert identifier within source system. System derived from sourceSystemHSAid."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationHeader.patientId"/>
      <display value="Patient ID (personnummer/samordningsnummer)"/>
      <target>
        <code value="patient"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Reference to Patient with Swedish national identifier. OID 1.2.752.129.2.1.3.1 (personnummer), 1.2.752.129.2.1.3.3 (samordningsnummer)"/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.approvedForPatient"/>
      <display value="Approved for patient access (true/false)"/>
      <target>
        <code value="meta.security"/>
        <equivalence value="equivalent"/>
        <comment
                 value="If false, add security label NOPATIENT to restrict patient access (menprövningsflagga)."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.typeOfAlertInformation"/>
      <display value="Type of alert (Läkemedelsöverkänslighet)"/>
      <target>
        <code value="type"/>
        <equivalence value="wider"/>
        <comment
                 value="Swedish alert type → FHIR AllergyIntolerance.type (allergy|intolerance). Only pharmaceutical hypersensitivity maps here. Other types use Flag resource."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.typeOfHypersensitivity"/>
      <display
               value="Type of hypersensitivity (medication, food, environment)"/>
      <target>
        <code value="category"/>
        <equivalence value="wider"/>
        <comment
                 value="Swedish hypersensitivity type (KV Typ av överkänslighet OID 1.2.752.129.2.2.3.10) → FHIR category: medication|food|environment|biologic. Requires ConceptMap."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.degreeOfSeverity"/>
      <display value="Degree of severity"/>
      <target>
        <code value="criticality"/>
        <equivalence value="wider"/>
        <comment
                 value="Swedish severity codes (KV Allvarlighetsgrad OID 1.2.752.129.2.2.3.3) → FHIR criticality: low|high|unable-to-assess. Lindrig/Måttlig→low, Svår/Livshotande→high."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.degreeOfCertainty"/>
      <display value="Degree of certainty/verification"/>
      <target>
        <code value="verificationStatus"/>
        <equivalence value="wider"/>
        <comment
                 value="Swedish certainty codes (KV Visshetsgrad OID 1.2.752.129.2.2.3.11) → FHIR verificationStatus: unconfirmed|presumed|confirmed|refuted. Requires ConceptMap."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance"/>
      <display value="ATC substance code"/>
      <target>
        <code value="code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="ATC code for pharmaceutical substance. System: http://www.whocc.no/atc or Swedish ATC (OID 1.2.752.129.2.2.3.1.1). code.coding.code + code.coding.display."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance.code"/>
      <display value="ATC code value"/>
      <target>
        <code value="code.coding.code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="ATC code (e.g., N02BE01 for paracetamol). System: http://www.whocc.no/atc"/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.atcSubstance.displayName"/>
      <display value="Substance name"/>
      <target>
        <code value="code.coding.display"/>
        <equivalence value="equivalent"/>
        <comment value="Substance display name (e.g., 'Paracetamol')"/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.nonAtcSubstance"/>
      <display value="Non-ATC substance description"/>
      <target>
        <code value="code.text"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Free text description when ATC code not available. Use code.text."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.hypersensitivity.pharmaceuticalHypersensitivity.pharmaceuticalProductId"/>
      <display value="NPL product ID"/>
      <target>
        <code value="code.coding"/>
        <equivalence value="wider"/>
        <comment
                 value="NPL (Nordic Pharmaceutical List) ID. System: OID 1.2.752.129.2.1.5.1. Add as additional coding alongside ATC."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.alertInformationComment"/>
      <display value="Comment/description of reaction"/>
      <target>
        <code value="reaction.description"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Free text description of observed reaction. For coded reactions, use reaction.manifestation with SNOMED CT codes."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.ascertainedDate"/>
      <display value="Date when hypersensitivity was ascertained"/>
      <target>
        <code value="onsetDateTime"/>
        <equivalence value="equivalent"/>
        <comment
                 value="When the allergy/intolerance was first identified or occurred."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.verifiedTime"/>
      <display value="Verification timestamp"/>
      <target>
        <code value="recordedDate"/>
        <equivalence value="equivalent"/>
        <comment
                 value="When the allergy was verified/recorded in the system. Also in Provenance.recorded."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.validityTimePeriod.start"/>
      <display value="Validity period start"/>
      <target>
        <code value="onsetDateTime"/>
        <equivalence value="equivalent"/>
        <comment value="Start of validity period for the alert."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.validityTimePeriod.end"/>
      <display value="Validity period end"/>
      <target>
        <code value="lastOccurrence"/>
        <equivalence value="wider"/>
        <comment
                 value="End of validity. If ended, may also set clinicalStatus=inactive or resolved."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.obsoleteTime"/>
      <display value="Time when alert became obsolete"/>
      <target>
        <code value="clinicalStatus"/>
        <equivalence value="wider"/>
        <comment
                 value="If obsoleteTime is set, clinicalStatus=inactive or resolved. Store actual obsolete timestamp in Provenance.recorded with activity=UPDATE describing status change."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationHeader.nullified"/>
      <display value="Alert nullified flag"/>
      <target>
        <code value="verificationStatus"/>
        <equivalence value="equivalent"/>
        <comment
                 value="If nullified=true, set verificationStatus=entered-in-error. Store nullifiedReason in Provenance."/>
      </target>
    </element>
  </group>
  <group>
    <source
            value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
    <target value="http://hl7.org/fhir/StructureDefinition/Flag"/>
    <element>
      <code value="alertInformation.alertInformationHeader.documentId"/>
      <display value="Alert ID"/>
      <target>
        <code value="identifier"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Unique alert identifier for non-pharmaceutical alerts."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationHeader.patientId"/>
      <display value="Patient ID"/>
      <target>
        <code value="subject"/>
        <equivalence value="equivalent"/>
        <comment value="Reference to Patient resource."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.approvedForPatient"/>
      <display value="Approved for patient access"/>
      <target>
        <code value="meta.security"/>
        <equivalence value="equivalent"/>
        <comment value="If false, add security label NOPATIENT."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.typeOfAlertInformation"/>
      <display
               value="Type of alert (Allvarlig sjukdom, Behandlingsvarning, etc.)"/>
      <target>
        <code value="category"/>
        <equivalence value="wider"/>
        <comment
                 value="Swedish alert type → Flag.category. Use Swedish CodeSystem or map to FHIR flag-category codes: safety|infection|drug|behavioral|etc."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.seriousDisease"/>
      <display value="Serious disease information"/>
      <target>
        <code value="code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Coded serious disease (e.g., bleeding disorder, infectious disease). Use SNOMED CT or ICD-10-SE codes."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.treatmentWarning"/>
      <display value="Treatment warning"/>
      <target>
        <code value="code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Treatment warning information. Code and text description."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.communicableDisease"/>
      <display value="Communicable disease"/>
      <target>
        <code value="code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Communicable disease alert. Use infectious disease codes."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.restrictionOfCare"/>
      <display value="Restriction of care"/>
      <target>
        <code value="code"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Care restriction information (e.g., DNR, treatment limitations)."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.unstructuredAlertInformation"/>
      <display value="Unstructured alert information"/>
      <target>
        <code value="code.text"/>
        <equivalence value="equivalent"/>
        <comment value="Free text alert when structured data not available."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.validityTimePeriod"/>
      <display value="Validity time period"/>
      <target>
        <code value="period"/>
        <equivalence value="equivalent"/>
        <comment
                 value="When the flag/alert is valid. period.start and period.end."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationBody.obsoleteTime"/>
      <display value="Obsolete time"/>
      <target>
        <code value="status"/>
        <equivalence value="wider"/>
        <comment
                 value="If obsoleteTime set, status=inactive. Otherwise status=active. FHIR status: active|inactive|entered-in-error."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationBody.alertInformationComment"/>
      <display value="Alert comment"/>
      <target>
        <code value="code.text"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Additional comment/description. Use code.text for brief comment or Flag.note for longer narrative."/>
      </target>
    </element>
  </group>
  <group>
    <source
            value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
    <target value="http://hl7.org/fhir/StructureDefinition/Provenance"/>
    <element>
      <code
            value="alertInformation.alertInformationHeader.sourceSystemHSAid"/>
      <display value="Source system HSA-ID"/>
      <target>
        <code value="entity.what"/>
        <equivalence value="equivalent"/>
        <comment
                 value="HSA-ID of source system. Also mapped to AllergyIntolerance/Flag.meta.source as https://hsaid.se/{HSA-ID}. Provenance.entity.role=source."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.authorTime"/>
      <display value="Author time (registration timestamp)"/>
      <target>
        <code value="recorded"/>
        <equivalence value="equivalent"/>
        <comment
                 value="When alert was recorded. Also in AllergyIntolerance.recordedDate."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalHSAid"/>
      <display value="Healthcare professional HSA-ID"/>
      <target>
        <code value="agent.who"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Reference to Practitioner with HSA-ID. Provenance.agent.type=author. Also in AllergyIntolerance.recorder."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalName"/>
      <display value="Healthcare professional name"/>
      <target>
        <code value="agent.who.display"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Display name. Full Practitioner resource should have structured name."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalRoleCode"/>
      <display value="Healthcare professional role/befattning"/>
      <target>
        <code value="agent.role"/>
        <equivalence value="relatedto"/>
        <comment
                 value="Professional role (befattning). Use KV Befattning (OID 1.2.752.129.2.2.1.4)."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalOrgUnit"/>
      <display value="Organization unit"/>
      <target>
        <code value="agent.onBehalfOf"/>
        <equivalence value="equivalent"/>
        <comment value="Reference to Organization (organizational unit)."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalCareUnitHSAid"/>
      <display value="Care unit HSA-ID (vårdenhet)"/>
      <target>
        <code value="entity.what"/>
        <equivalence value="equivalent"/>
        <comment
                 value="HSA-ID for care unit. Reference to Organization. Part of PDL hierarchy."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.accountableHealthcareProfessional.healthcareProfessionalCareGiverHSAid"/>
      <display value="Care provider HSA-ID (vårdgivare)"/>
      <target>
        <code value="entity.what"/>
        <equivalence value="equivalent"/>
        <comment
                 value="HSA-ID for care provider. Top-level organization in PDL hierarchy."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.legalAuthenticator.signatureTime"/>
      <display value="Signature timestamp"/>
      <target>
        <code value="signature.when"/>
        <equivalence value="equivalent"/>
        <comment value="When alert was digitally signed (if applicable)."/>
      </target>
    </element>
    <element>
      <code
            value="alertInformation.alertInformationHeader.legalAuthenticator.legalAuthenticatorHSAid"/>
      <display value="Legal authenticator HSA-ID"/>
      <target>
        <code value="signature.who"/>
        <equivalence value="equivalent"/>
        <comment
                 value="Reference to Practitioner who signed alert. Provenance.agent.type=legal."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationHeader.nullifiedReason"/>
      <display value="Reason for nullification"/>
      <target>
        <code value="reason"/>
        <equivalence value="relatedto"/>
        <comment
                 value="Why alert was nullified. Store in Provenance.reason when verificationStatus=entered-in-error."/>
      </target>
    </element>
  </group>
  <group>
    <source
            value="https://rivta.se/domains/clinicalprocess/healthcond/description/GetAlertInformationResponder/2"/>
    <target value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <element>
      <code value="alertInformation.alertInformationHeader.documentTitle"/>
      <display value="Document title"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED. Cardinality 0..0 for GetAlertInformation."/>
      </target>
    </element>
    <element>
      <code value="alertInformation.alertInformationHeader.documentTime"/>
      <display value="Document time"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED. Cardinality 0..0 for GetAlertInformation. Use authorTime or verifiedTime instead."/>
      </target>
    </element>
    <element>
      <code value="result.resultCode"/>
      <display value="Result code (OK, INFO, ERROR)"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED to resources. HTTP status: OK→200, INFO→200 with warnings, ERROR→4xx/5xx."/>
      </target>
    </element>
    <element>
      <code value="result.errorCode"/>
      <display value="Error code"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED to resources. Use in OperationOutcome.issue.code when resultCode=ERROR."/>
      </target>
    </element>
    <element>
      <code value="result.logId"/>
      <display value="Log ID (UUID for troubleshooting)"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED to resources. Use in OperationOutcome.issue.diagnostics or X-Request-Id header."/>
      </target>
    </element>
    <element>
      <code value="result.message"/>
      <display value="Result message"/>
      <target>
        <equivalence value="unmatched"/>
        <comment
                 value="NOT MAPPED to resources. User-facing message in OperationOutcome.issue.diagnostics."/>
      </target>
    </element>
  </group>
</ConceptMap>