@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://hl7.eu/fhir/ig/hl7.eu.fhir.protect-child/ConceptMap/dm-patient-to-omop> a fhir:ConceptMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "dm-patient-to-omop"] ;
  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 dm-patient-to-omop</b></p><a name=\"dm-patient-to-omop\"> </a><a name=\"hcdm-patient-to-omop\"> </a><p>This mapping does not specify any particular context of use.</p><br/><p>Mapping from <a href=\"CodeSystem-dm-variable-cs.html\">PROTECT-CHILD Data Model Variables</a> to <a href=\"http://terminology.hl7.org/6.3.0/CodeSystem-OMOP.html\">OHDSI Standardized Vocabularies</a></p><table class=\"grid\"><tr><td colspan=\"2\"><b>Source Concept Details</b></td><td><b>Relationship</b></td><td colspan=\"2\"><b>Target Concept Details</b></td><td><b>Comment</b></td></tr><tr><td colspan=\"2\"><b>Codes</b> from <a href=\"CodeSystem-dm-variable-cs.html\" title=\"https://hl7.eu/fhir/ig/hl7.eu.fhir.protect-child/CodeSystem/dm-variable-cs\">PROTECT-CHILD Data Model Variables</a></td><td/><td colspan=\"2\"><b>Codes</b> from <a href=\"http://terminology.hl7.org/6.3.0/CodeSystem-OMOP.html\" title=\"https://fhir-terminology.ohdsi.org\">OHDSI Standardized Vocabularies</a></td><td/></tr><tr><td style=\"border-right-width: 0px; border-bottom-style: none\">patient.gender</td><td style=\"border-left-width: 0px; border-bottom-style: none\">patient.gender</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#narrower\" title=\"narrower\">narrower</a></td><td style=\"border-right-width: 0px\">8532</td><td style=\"border-left-width: 0px\">FEMALE</td><td>OMOP PERSON.gender_concept_id; vocabulary Gender.</td></tr><tr><td style=\"border-right-width: 0px; border-top-style: none\"/><td style=\"border-top-style: none; border-left-width: 0px\"/><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#narrower\" title=\"narrower\">narrower</a></td><td style=\"border-right-width: 0px\">8507</td><td style=\"border-left-width: 0px\">MALE</td><td>OMOP PERSON.gender_concept_id; vocabulary Gender.</td></tr><tr><td style=\"border-right-width: 0px; border-bottom-style: none\">patient.max_pra</td><td style=\"border-left-width: 0px; border-bottom-style: none\">patient.max_pra</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">21493706</td><td style=\"border-left-width: 0px\">Calculated panel reactive antibody - Serum</td><td>OMOP MEASUREMENT.measurement_concept_id; vocabulary LOINC.</td></tr><tr><td style=\"border-right-width: 0px; border-top-style: none\"/><td style=\"border-top-style: none; border-left-width: 0px\"/><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#relatedto\" title=\"relatedto\">is related to</a></td><td style=\"border-right-width: 0px\">8554</td><td style=\"border-left-width: 0px\">percent</td><td>OMOP MEASUREMENT.unit_concept_id; vocabulary UCUM.</td></tr><tr><td style=\"border-right-width: 0px; border-bottom-style: none\">patient.last_pra</td><td style=\"border-left-width: 0px; border-bottom-style: none\">patient.last_pra</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">21493706</td><td style=\"border-left-width: 0px\">Calculated panel reactive antibody - Serum</td><td>OMOP MEASUREMENT.measurement_concept_id; vocabulary LOINC.</td></tr><tr><td style=\"border-right-width: 0px; border-top-style: none\"/><td style=\"border-top-style: none; border-left-width: 0px\"/><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#relatedto\" title=\"relatedto\">is related to</a></td><td style=\"border-right-width: 0px\">8554</td><td style=\"border-left-width: 0px\">percent</td><td>OMOP MEASUREMENT.unit_concept_id; vocabulary UCUM.</td></tr><tr><td style=\"border-right-width: 0px\">patient.date_histological_diag</td><td style=\"border-left-width: 0px\">patient.date_histological_diag</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#equivalent\" title=\"equivalent\">is equivalent to</a></td><td style=\"border-right-width: 0px\">2000000042</td><td style=\"border-left-width: 0px\">Primary diagnosis confirmed by histology</td><td>OMOP OBSERVATION.observation_concept_id; vocabulary PROTECT-CHILD.</td></tr><tr><td style=\"border-right-width: 0px\">patient.diag_primary_disease</td><td style=\"border-left-width: 0px\">patient.diag_primary_disease</td><td><a href=\"http://hl7.org/fhir/R4/codesystem-concept-map-equivalence.html#relatedto\" title=\"relatedto\">is related to</a></td><td style=\"border-right-width: 0px\">32902</td><td style=\"border-left-width: 0px\">Primary diagnosis</td><td>OMOP CONDITION_OCCURRENCE.condition_status_concept_id; vocabulary Condition Status.</td></tr></table></div>"
  ] ;
  fhir:ConceptMap.url [ fhir:value "https://hl7.eu/fhir/ig/hl7.eu.fhir.protect-child/ConceptMap/dm-patient-to-omop"] ;
  fhir:ConceptMap.version [ fhir:value "0.1.0-ci-build"] ;
  fhir:ConceptMap.name [ fhir:value "DmPatientToOmop"] ;
  fhir:ConceptMap.title [ fhir:value "DM patient → OMOP"] ;
  fhir:ConceptMap.status [ fhir:value "draft"] ;
  fhir:ConceptMap.experimental [ fhir:value "false"^^xsd:boolean] ;
  fhir:ConceptMap.date [ fhir:value "2026-09-28T06:51:47+00:00"^^xsd:dateTime] ;
  fhir:ConceptMap.publisher [ fhir:value "Protect Child"] ;
  fhir:ConceptMap.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "Protect Child" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://protect-child.eu/" ]
     ]
  ] ;
  fhir:ConceptMap.description [ fhir:value "The OMOP concepts for each column of the DMv1.2 patient table, from the DM → FHIR → OMOP crosswalk. Each target's comment names the OMOP CDM field it fills. `equivalent`: the column's own concept; `narrower`: one of several concepts the column's values map to; `relatedto`: a value, unit or qualifier concept. Concept IDs of 2000000000 and above are PROTECT-CHILD custom concepts (CodeSystem ProtectChildOmopVocabulary)."] ;
  fhir:ConceptMap.group [
     fhir:index 0 ;
     fhir:ConceptMap.group.source [ fhir:value "https://hl7.eu/fhir/ig/hl7.eu.fhir.protect-child/CodeSystem/dm-variable-cs" ] ;
     fhir:ConceptMap.group.target [ fhir:value "https://fhir-terminology.ohdsi.org" ] ;
     fhir:ConceptMap.group.element [
       fhir:index 0 ;
       fhir:ConceptMap.group.element.code [ fhir:value "patient.gender" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index 0 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "8532" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "FEMALE" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "narrower" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP PERSON.gender_concept_id; vocabulary Gender." ]
       ], [
         fhir:index 1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "8507" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "MALE" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "narrower" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP PERSON.gender_concept_id; vocabulary Gender." ]
       ]
     ], [
       fhir:index 1 ;
       fhir:ConceptMap.group.element.code [ fhir:value "patient.max_pra" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index 0 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "21493706" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "Calculated panel reactive antibody - Serum" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP MEASUREMENT.measurement_concept_id; vocabulary LOINC." ]
       ], [
         fhir:index 1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "8554" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "percent" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "relatedto" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP MEASUREMENT.unit_concept_id; vocabulary UCUM." ]
       ]
     ], [
       fhir:index 2 ;
       fhir:ConceptMap.group.element.code [ fhir:value "patient.last_pra" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index 0 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "21493706" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "Calculated panel reactive antibody - Serum" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP MEASUREMENT.measurement_concept_id; vocabulary LOINC." ]
       ], [
         fhir:index 1 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "8554" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "percent" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "relatedto" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP MEASUREMENT.unit_concept_id; vocabulary UCUM." ]
       ]
     ], [
       fhir:index 3 ;
       fhir:ConceptMap.group.element.code [ fhir:value "patient.date_histological_diag" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index 0 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "2000000042" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "Primary diagnosis confirmed by histology" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "equivalent" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP OBSERVATION.observation_concept_id; vocabulary PROTECT-CHILD." ]
       ]
     ], [
       fhir:index 4 ;
       fhir:ConceptMap.group.element.code [ fhir:value "patient.diag_primary_disease" ] ;
       fhir:ConceptMap.group.element.target [
         fhir:index 0 ;
         fhir:ConceptMap.group.element.target.code [ fhir:value "32902" ] ;
         fhir:ConceptMap.group.element.target.display [ fhir:value "Primary diagnosis" ] ;
         fhir:ConceptMap.group.element.target.equivalence [ fhir:value "relatedto" ] ;
         fhir:ConceptMap.group.element.target.comment [ fhir:value "OMOP CONDITION_OCCURRENCE.condition_status_concept_id; vocabulary Condition Status." ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<https://hl7.eu/fhir/ig/hl7.eu.fhir.protect-child/ConceptMap/dm-patient-to-omop.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

