@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 -------------------------------------------------------------------

<http://hl7.org/fhir/uv/v2mappings/ConceptMap/segment-msh-transformation-to-provenance> a fhir:ConceptMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "segment-msh-transformation-to-provenance"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: ConceptMap segment-msh-transformation-to-provenance</b></p><a name=\"segment-msh-transformation-to-provenance\"> </a><a name=\"hcsegment-msh-transformation-to-provenance\"> </a><p>Mapping from (not specified) to (not specified)</p><br/><p><b>Group 1 </b>Mapping from <code>unspecified code system</code> to <code>unspecified code system</code></p><table class=\"grid\"><tr><td colspan=\"3\"><b>Source Concept Details</b></td><td><b>Relationship</b></td><td colspan=\"2\"><b>Target Concept Details</b></td></tr><tr><td colspan=\"2\"><b>Codes</b> from </td><td><b>NarrativeCondition</b></td><td/><td colspan=\"2\"><b>Codes</b> from </td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">activity.coding.code</td><td style=\"border-left-width: 0px\">activity.coding.code</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">activity.coding.system</td><td style=\"border-left-width: 0px\">activity.coding.system</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">recorded</td><td style=\"border-left-width: 0px\">recorded</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">policy</td><td style=\"border-left-width: 0px\">policy</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">agent[1].type.coding.code</td><td style=\"border-left-width: 0px\">agent[1].type.coding.code</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">agent[1].type.coding.system</td><td style=\"border-left-width: 0px\">agent[1].type.coding.system</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">agent[1].who(Organization|Device)</td><td style=\"border-left-width: 0px\">agent[1].who(Organization|Device)</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td>when you hold on to/persist the v2 message in a data store</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">entity[1].what(DocumentReference.content.attachment.url)</td><td style=\"border-left-width: 0px\">entity[1].what(DocumentReference.content.attachment.url)</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td>when you do not hold on to/persist the v2 message in a data store</td><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">entity[1].what(DocumentReference.content.attachment.data)</td><td style=\"border-left-width: 0px\">entity[1].what(DocumentReference.content.attachment.data)</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">entity[1].what(DocumentReference.status)</td><td style=\"border-left-width: 0px\">entity[1].what(DocumentReference.status)</td></tr><tr><td style=\"border-right-width: 0px\">MSH</td><td style=\"border-left-width: 0px\"/><td/><td><a href=\"http://hl7.org/fhir/R5/codesystem-concept-map-relationship.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">entity[1].role</td><td style=\"border-left-width: 0px\">entity[1].role</td></tr></table></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:extension ( [
     fhir:extension ( [
       fhir:url [ fhir:v "type"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:code ;
         fhir:v "derived-from"
       ]
     ] [
       fhir:url [ fhir:v "label"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:string ;
         fhir:v "Segment MSH[Transformation] to Provenance.fsh"
       ]
     ] [
       fhir:url [ fhir:v "url"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:uri ;
         fhir:v "https://docs.google.com/spreadsheets/d/1byfzqOfOvIVdRkHv2Tto5a-a0YMYWWP0eryaZBvibIo/edit?gid=0#gid=0"^^xsd:anyURI
       ]
     ] ) ;
     fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/RelatedArtifact"^^xsd:anyURI ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
     fhir:value [
       a fhir:code ;
       fhir:v "oo"
     ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"^^xsd:anyURI ] ;
     fhir:value [
       a fhir:code ;
       fhir:v "informative" ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom"^^xsd:anyURI ] ;
         fhir:value [
           a fhir:canonical ;
           fhir:v "http://hl7.org/fhir/uv/v2mappings/ImplementationGuide/hl7.fhir.uv.v2mappings"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/uv/v2mappings/ImplementationGuide/hl7.fhir.uv.v2mappings>
         ]
       ] )
     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/ConceptMap/segment-msh-transformation-to-provenance"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "SegmentMSHTransformationToProvenance"] ; # 
  fhir:title [ fhir:v "Segment MSH [Transformation] to Provenance Map"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:experimental [ fhir:v true] ; # 
  fhir:date [ fhir:v "2025-08-25"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "HL7 International / Orders and Observations"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "HL7 Orders and Observations Workgroup" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/orders" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "This ConceptMap represents a mapping from the HL7 V2 Segment MSH to the FHIR Provenance Resource."] ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "001" ]
     ] )
  ] ) ; # 
  fhir:copyright [ fhir:v "Copyright (c) 2025, HL7 International, Inc., All Rights Reserved."] ; # 
  fhir:group ( [
     fhir:element ( [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 0
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"v2-fhir-transformation\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "activity.coding.code" ] ;
         fhir:display [ fhir:v "activity.coding.code" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 0
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"http://hl7.org/fhir/uv/v2mappings/CodeSystem/provenance-activity-type-v2-to-fhir\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "activity.coding.system" ] ;
         fhir:display [ fhir:v "activity.coding.system" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "/timestamp of tranformation/"
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "recorded" ] ;
         fhir:display [ fhir:v "recorded" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 0
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v -1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "/uri of the policy governing transformation of the v2 to FHIR/"
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "policy" ] ;
         fhir:display [ fhir:v "policy" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "type"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:code ;
               fhir:v "string"
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 0
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"assembler\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "agent[1].type.coding.code" ] ;
         fhir:display [ fhir:v "agent[1].type.coding.code" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "type"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:code ;
               fhir:v "url"
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 0
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"http://terminology.hl7.org/CodeSystem/provenance-participant-type\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "agent[1].type.coding.system" ] ;
         fhir:display [ fhir:v "agent[1].type.coding.system" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "type"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:code ;
               fhir:v "Reference(Organization|Device)"
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMin"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "cardinalityMax"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:integer ;
               fhir:v 1
             ]
           ] [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "/the organization owning or device performing the transformation by the mapping tool/"
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "agent[1].who(Organization|Device)" ] ;
         fhir:display [ fhir:v "agent[1].who(Organization|Device)" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:code [ fhir:v "entity[1].what(DocumentReference.content.attachment.url)" ] ;
         fhir:display [ fhir:v "entity[1].what(DocumentReference.content.attachment.url)" ] ;
         fhir:equivalence [ fhir:v "equivalent" ] ;
         fhir:dependsOn ( [
           fhir:property [ fhir:v "Narrative-Condition"^^xsd:anyURI ] ;
           fhir:value [ fhir:v "when you hold on to/persist the v2 message in a data store" ]
         ] )
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "/v2.txt or v2.xml into base 64/"
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "entity[1].what(DocumentReference.content.attachment.data)" ] ;
         fhir:display [ fhir:v "entity[1].what(DocumentReference.content.attachment.data)" ] ;
         fhir:equivalence [ fhir:v "equivalent" ] ;
         fhir:dependsOn ( [
           fhir:property [ fhir:v "Narrative-Condition"^^xsd:anyURI ] ;
           fhir:value [ fhir:v "when you do not hold on to/persist the v2 message in a data store" ]
         ] )
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"current\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "entity[1].what(DocumentReference.status)" ] ;
         fhir:display [ fhir:v "entity[1].what(DocumentReference.status)" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] [
       fhir:code [ fhir:v "MSH" ] ;
       fhir:target ( [
         fhir:extension ( [
           fhir:extension ( [
             fhir:url [ fhir:v "assignment"^^xsd:anyURI ] ;
             fhir:value [
               a fhir:string ;
               fhir:v "\"source\""
             ]
           ] ) ;
           fhir:url [ fhir:v "http://hl7.org/fhir/uv/v2mappings/StructureDefinition/TypeInfo"^^xsd:anyURI ]
         ] ) ;
         fhir:code [ fhir:v "entity[1].role" ] ;
         fhir:display [ fhir:v "entity[1].role" ] ;
         fhir:equivalence [ fhir:v "equivalent" ]
       ] )
     ] )
  ] ) . # 

# -------------------------------------------------------------------------------------

