slanted W3C logo
Cover page images (keys)

Semantic Representations of Clinical Care Data Leveraging HL7 FHIR

SWAT4LS
4 Dec, 2016

http://www.w3.org/2016/Talks/1205-swat4ls-egp/validation/

pirate pad for collaboration: http://piratepad.net/fhirshex

Reasoning

TermInfo Opportunity

image/svg+xml Diagnosis Evidence Evidence Rectord Target IsabellaJones NEXTGENMedicalPractice PATIENTRole recordTarget player scoper ClinicalDocument Diagnosis 282291009 20130605 20130602 SNOMED Encounter REFR DRIV DRIV 20130131 inpatient Information Model

TermInfo Opportunity

image/svg+xml Terminology Model Diagnosis 282291009

TermInfo Opportunity

image/svg+xml Diagnosis Evidence Evidence Rectord Target IsabellaJones NEXTGENMedicalPractice PATIENTRole recordTarget player scoper ClinicalDocument Diagnosis 282291009 20130605 20130602 SNOMED Encounter REFR DRIV DRIV 20130131 inpatient Information Model Terminology Model Diagnosis 282291009

TermInfo example

PREFIX sctid: <http://snomed.info/id/>
amy:Obs1 a fhir:Observation;
   fhir:code      [
      a fhir:CodeableConcept;
      fhir:coding ( [
         a           sctid:69896004;
         fhir:system [ fhir:v "http://snomed.info/sct" ];
         fhir:code   [ fhir:v "69896004" ]
      ] )
   ]
.

Start with a rich predicate ontology

fhir:Patient a owl:Class ; rdfs:label "fhir patient" .
fhir:code a owl:ObjectProperty; rdfs:label "fhir:code" .
fhir:Codeablecoding a owl:ObjectProperty; rdfs:label "fhir:Codeablecoding" .
fhir:system a owl:ObjectProperty; rdfs:label "fhir:system" .
fhir:code a owl:ObjectProperty; rdfs:label "fhir:code" .
fhir:v a owl:DatatypeProperty; rdfs:label "fhir value" .

look for the code

fhir:code some (
  fhir:Codeablecoding some (
    fhir:code some (fhir:value value "69896004") ) )

fhir:Observation-of-Rheumatoid_arthritis-disorder a owl:Class ;
    rdfs:label "fhir Observation of Rheumatoidarthritis (disorder)" ;
    owl:equivalentClass [
        owl:onProperty fhir:code ;
        owl:someValuesFrom [
            owl:onProperty fhir:Codeablecoding ;
            owl:someValuesFrom [
                owl:onProperty fhir:code ;
                owl:someValuesFrom [
                    owl:onProperty fhir:v ;
                    owl:hasValue "69896004"
                ]
            ]
        ]
    ]
.

Data:

PREFIX sctid: <http://snomed.info/id/>
amy:Obs1 a fhir:Observation;
   fhir:code      [
      a fhir:CodeableConcept;
      fhir:coding ( [
         a           sctid:69896004;
         fhir:system [ fhir:v "http://snomed.info/sct" ];
         fhir:code   [ fhir:v "69896004" ]
      ] )
   ]
.

what about the system?

 fhir:Observation.code some (
   fhir:CodeableConcept.coding some (
     fhir:Coding.system some (fhir:v value "http://snomed.info/sct")
     and fhir:Coding.code some (fhir:v value "69896004") ) )
fhir:Observation-of-Rheumatoid_arthritis-disorder a owl:Class ;
    rdfs:label "fhir Observation of Rheumatoidarthritis (disorder)" ;
    owl:equivalentClass [
        owl:onProperty fhir:Observation.code ;
        owl:someValuesFrom [
            owl:onProperty fhir:CodeableConcept.coding ;
            owl:someValuesFrom [ owl:intersectionOf (
              [ owl:onProperty fhir:Coding.code ;
                owl:someValuesFrom
                  [ owl:onProperty fhir:v ;
                    owl:hasValue "69896004" ] ]
              [ owl:onProperty fhir:Coding.system ;
                owl:someValuesFrom
                  [ owl:onProperty fhir:v ;
                    owl:hasValue "http://snomed.info/sct"
                ] ]
            ) ]
        ]
    ]
.

can't reason about literals

[ owl:intersectionOf (
  [ owl:onProperty fhir:code ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "69896004" ] ]
  [ owl:onProperty fhir:system ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "http://snomed.info/sct"
    ] ]
) ] rdfs:subClassOf fhir:Codinng-of-Rheumatoid_arthritis-disorder .

later fixed with fhir:concept links

now we can look for Observations with that coding

 fhir:Observation.code some (
   fhir:CodeableConcept.coding some fhir:Codinng-of-Rheumatoid_arthritis-disorder )
    
fhir:Observation-of-Rheumatoid_arthritis-disorder a owl:Class ;
    rdfs:label "fhir Observation of Rheumatoidarthritis (disorder)" ;
    owl:equivalentClass [
        owl:onProperty fhir:Observation.code ;
        owl:someValuesFrom [
            owl:onProperty fhir:CodeableConcept.coding ;
            owl:someValuesFrom snomedct:Rheumatoid_arthritis-disorder
        ]
    ]
.

snomed subsumptions, either directly

 fhir:Observation.code some (
   fhir:CodeableConcept.coding some snomedct:Rheumatoid_arthritis-disorder )
    
fhir:Observation-of-Rheumatoid_arthritis-disorder a owl:Class ;
    rdfs:label "fhir Observation of Rheumatoidarthritis (disorder)" ;
    owl:equivalentClass [
        owl:onProperty fhir:Observation.code ;
        owl:someValuesFrom [
            owl:onProperty fhir:CodeableConcept.coding ;
            owl:someValuesFrom snomedct:Rheumatoid_arthritis-disorder
        ]
    ]
.

or via a connecting property

fhir:Observation.code some (
  fhir:CodeableConcept.coding some (
    fhir:concept some snomedct:Rheumatoid_arthritis-disorder ) )
    
fhir:Observation-of-Rheumatoid_arthritis-disorder a owl:Class ;
    rdfs:label "fhir Observation of Rheumatoidarthritis (disorder)" ;
    owl:equivalentClass [
        owl:onProperty fhir:Observation.code ;
        owl:someValuesFrom [
            owl:onProperty fhir:CodeableConcept.coding ;
            owl:someValuesFrom [
                owl:onProperty fhir:concept ;
                owl:someValuesFrom snomedct:Rheumatoid_arthritis-disorder
            ]
        ]
    ]
.

connect FHIR coding to SNOMED concept

fhir:Codinng-of-Rheumatoid_arthritis-disorder rdfs:subClassOf
  [ owl:onProperty fhir:concept ;
    owl:someValuesFrom snomedct:Rheumatoid_arthritis-disorder ].
    

now use SNOMED's hierarchy

by direct subclass:

fhir:Observation.code some (
  fhir:CodeableConcept.coding some (
    fhir:concept some snomedct:Arthritis-disorder ) )
    

by class restriction:

fhir:Observation.code some (
  fhir:CodeableConcept.coding some (
    fhir:concept some (snomedct:Inflammatory_disorder-disorder
      and (snomedct:role_group-attr some 
         (snomedct:Associated_morphology-attr some snomedct:Inflammatory_morphology-morph
          and snomedct:Finding_site-attr some snomedct:Structure_of_musculoskeletal_system-body))
    )))

importing with fhir:concept

axiom:

[ owl:intersectionOf (
  [ owl:onProperty fhir:code ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "69896004" ] ]
  [ owl:onProperty fhir:system ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "http://snomed.info/sct"
    ] ]
) ] rdfs:subClassOf fhir:Codinng-of-Rheumatoid_arthritis-disorder .

data:

PREFIX sctid: <http://snomed.info/id/>
amy:Obs1 a fhir:Observation;
   fhir:code      [
      a fhir:CodeableConcept;
      fhir:coding ( [
         a           sctid:69896004;
         fhir:system [ fhir:v "http://snomed.info/sct" ];
         fhir:code   [ fhir:v "69896004" ]
      ] )
   ]
.
amy:Obs1
  fhir:Observation.code [
    fhir:concept snomedct:Rheumatoid_arthritis-disorder # <-?
    fhir:CodeableConcept.coding [
      fhir:concept snomedct:Rheumatoid_arthritis-disorder
    ]
  ] .

get rid of some junk

recognizers:

[ owl:intersectionOf (
  [ owl:onProperty fhir:code ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "69896004" ] ]
  [ owl:onProperty fhir:system ;
    owl:someValuesFrom
      [ owl:onProperty fhir:v ;
        owl:hasValue "http://snomed.info/sct"
    ] ]
) ] rdfs:subClassOf fhir:Coding-of-Rheumatoid_arthritis-disorder .

connective tissue:

fhir:Coding-of-Rheumatoid_arthritis-disorder rdfs:subClassOf
  [ owl:onProperty fhir:concept ;
    owl:someValuesFrom snomedct:Rheumatoid_arthritis-disorder ].

Seronegative_rheumatoid_arthritis

Seronegative_rheumatoid_arthritis

Rheumatoid_arthritis

Rheumatoid_arthritis