@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://examplesihe.org.uk/ConceptMap/v2-0123-to-diagnostic-report-status> a fhir:ConceptMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "v2-0123-to-diagnostic-report-status"] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: ConceptMap v2-0123-to-diagnostic-report-status</b></p><a name=\"v2-0123-to-diagnostic-report-status\"> </a><a name=\"hcv2-0123-to-diagnostic-report-status\"> </a><p>Mapping from <a href=\"http://terminology.hl7.org/7.5.0/ValueSet-v2-0123.html\">hl7VS-resultStatus-Obr</a> to <a href=\"http://hl7.org/fhir/R4/valueset-diagnostic-report-status.html\">DiagnosticReportStatus</a></p><br/><p>Mapping from <a href=\"http://terminology.hl7.org/7.5.0/CodeSystem-v2-0123.html\">resultStatus</a> to <a href=\"http://hl7.org/fhir/R4/codesystem-diagnostic-report-status.html\">DiagnosticReportStatus</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>O (Order received; specimen not yet received)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-source-is-narrower-than-target\" title=\"source-is-narrower-than-target\">is narrower than</a></td><td>registered</td><td/></tr><tr><td>I (No results available; specimen received, procedure incomplete)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-source-is-narrower-than-target\" title=\"source-is-narrower-than-target\">is narrower than</a></td><td>registered</td><td/></tr><tr><td>S (No results available; procedure scheduled, but not done)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-source-is-narrower-than-target\" title=\"source-is-narrower-than-target\">is narrower than</a></td><td>partial</td><td/></tr><tr><td>A (Some, but not all, results available)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-source-is-narrower-than-target\" title=\"source-is-narrower-than-target\">is narrower than</a></td><td>partial</td><td/></tr><tr><td>P (Preliminary)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-equivalent\" title=\"equivalent\">is equivalent to</a></td><td>preliminary</td><td/></tr><tr><td>C (Corrected, final)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-equivalent\" title=\"equivalent\">is equivalent to</a></td><td>corrected</td><td/></tr><tr><td>R (Results stored; not yet verified)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-source-is-narrower-than-target\" title=\"source-is-narrower-than-target\">is narrower than</a></td><td>partial</td><td/></tr><tr><td>F (Final results)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-equivalent\" title=\"equivalent\">is equivalent to</a></td><td>final</td><td/></tr><tr><td>X (No results available; Order canceled)</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#concept-map-equivalence-equivalent\" title=\"equivalent\">is equivalent to</a></td><td>cancelled</td><td/></tr><tr><td>Y (No order on record for this test)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">No order on record for this test - reject the message</td></tr><tr><td>Z (No record of this patient)</td><td colspan=\"2\" style=\"background-color: #efefef\">(not mapped)</td><td style=\"background-color: #efefef\">No record of this patient - reject the message</td></tr></table></div>"
  ] ;
  fhir:ConceptMap.url [ fhir:value "https://examplesihe.org.uk/ConceptMap/v2-0123-to-diagnostic-report-status"] ;
  fhir:ConceptMap.version [ fhir:value "0.1.0"] ;
  fhir:ConceptMap.name [ fhir:value "V20123ToDiagnosticReportStatus"] ;
  fhir:ConceptMap.title [ fhir:value "HL7 v2 Result Status to DiagnosticReport.status"] ;
  fhir:ConceptMap.status [ fhir:value "draft"] ;
  fhir:ConceptMap.experimental [ fhir:value "true"^^xsd:boolean] ;
  fhir:ConceptMap.date [ fhir:value "2026-11-04"^^xsd:date] ;
  fhir:ConceptMap.publisher [ fhir:value "Kevin Mayfield"] ;
  fhir:ConceptMap.contact [
     fhir:index -1 ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://github.com/KevinMayfield/PathologyAndLaboratory" ]
     ]
  ] ;
  fhir:ConceptMap.description [ fhir:value "HL7 v2 table 0123 Result Status (OBR-25) to FHIR `DiagnosticReport.status`. Indicative, based on the HL7 v2-to-FHIR IG."] ;
  fhir:ConceptMap.jurisdiction [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
       fhir:Coding.code [ fhir:value "GB" ] ;
       fhir:Coding.display [ fhir:value "United Kingdom of Great Britain and Northern Ireland" ]
     ]
  ] ;
  fhir:ConceptMap.sourceUri [ fhir:value "http://terminology.hl7.org/ValueSet/v2-0123"] ;
  fhir:ConceptMap.targetUri [ fhir:value "http://hl7.org/fhir/ValueSet/diagnostic-report-status"] ;
  fhir:ConceptMap.group [
     fhir:index -1 ;
     fhir:ConceptMap.group.source [ fhir:value "http://terminology.hl7.org/CodeSystem/v2-0123" ] ;
     fhir:ConceptMap.group.target [ fhir:value "http://hl7.org/fhir/diagnostic-report-status" ] ;
     fhir:ConceptMap.group.element [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "O" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "registered" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "wider" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "I" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "registered" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "wider" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "S" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "partial" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "wider" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "A" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "partial" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "wider" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "P" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "preliminary" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "C" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "corrected" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "R" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "partial" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "wider" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "F" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "final" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "X" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "cancelled" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "Y" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "unmatched" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "No order on record for this test - reject the message" ]
       ]
     ], [
       fhir:index -1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "Z" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index -1 ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "unmatched" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "No record of this patient - reject the message" ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<https://examplesihe.org.uk/ConceptMap/v2-0123-to-diagnostic-report-status.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

