Skip to main content

Table 7 Ontology evaluation using competency questions

From: A mobile health monitoring-and-treatment system based on integration of the SSN sensor ontology and the HL7 FHIR standard

Competency question SPARQL query Competency question SPARQL query
Q1. Find all patients who achieved their TP goals. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fasto:hasGoalAchieved “true”^^xsd:Boolean.
}
Q2. Who are the patients suffering from a specific disease with SNOMED CT code of X. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasComplication? cond.
?cond fhir:Condition.code? code.
?code fhir:Coding? coding.
?coding fhir:Coding.code X;
fhir:Coding.system “SNOMEDCT”.
}
Q3. What is the current pre-meal BG target for a patient with identifier X. SELECT? code,? system,? value WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasPatientProfile? prof.
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fhir:DailyPerMealGlucoseLevel? goal.
?goal fhir:Goal.target? target.
?target fhir:Goal.target.detailQuantity? quant.
?quant fhir:Quantity.code? code;
fhir: Quantity.value? value;
fhir: Quantity.system? system.
}
Q4. What is the current exercise plan for patient with identifier X. SELECT DISTINCT? exe WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasPatientProfile? prof.
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fhir:CarePlan.activity? act.
?act fhir:CarePlan.activity.reference? exe.
?exe rdf:type fasto:exercisePlan.
}
Q5. Find all patients that are prevented from doing exercise with the compendium code of X. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasComplication? cond.
?cond fhir:Condition.disease? d.
?d fasto:diseaseContradictWithExercise? exe.
?exe fasto:hasCompendiumCode X.
}
Q6. What is the insulin regimen defined for patient with identifier X. SELECT? ir WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasPatientProfile? prof.
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fasto:hasInsulinRegimen? ir.
}
Q7. What are the current education materials assigned to the patient X. SELECT? rec,? topic,? course WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasEducationRecord? rec.
?rec fasto:hasLearningCourse? course;
fasto:hasLearningTopic? topic.
}
Q8. Find intensive insulin regimens, which are based on the long acting insulin with SNOMED CT code of X.
FASTO supports any standard coding terminology such as SNOMED CT, LOINC, RxNorm, ICD, etc. These standards support interoperability and improve the semantic meaning of medical terms.
SELECT? ir WHERE {
?ir rdf:type fasto:insulinRegimen;
fasto:hasBasalInsulin? ba.
?ba fhir:Medication.code? code;
?code fhir:Coding? coding.
?coding fhir:Coding.code X.
}
Q9. Find patients that are contradict with 414,518,007|insulin detemir.
A patient is prevented from taking insulin detemir in two cases: first, if he/she is currently taking a drug that contradicts with detemir, and second, if he/she has some diseases that is contradicting with detemir.
SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasPatientMedication? medstat.
?medstat fhir:MedicationReference? med.
?med fasto:drugContradictWithDrug? med2.
?med2 fhir:Medication.code? s;
fhir:Coding? coding.
?coding fhir:Coding.code “126,212,009”^^xsd:string;
fhir:Coding.system “SNOMEDCT”.
}
UNION
{
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasComplication? cond.
?cond fhir:Condition.disease? d.
?d fasto:diseaseContradictWithDrug? med2.
?med2 fhir:Medication.code? s;
fhir:Coding? coding.
?coding fhir:Coding.code “126,212,009”^^xsd:string;
fhir:Coding.system “SNOMEDCT”.
}
Q10. List all patient taking rapid acting insulin with SNOMED CT code of X. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fasto:hasInsulinRegimen? ir.
?ir fasto:hasBolusInsulin? ins.
?ins fasto:Medication.code? code;
?code fhir:Coding? coding;
?coding fhir:Coding.code X.
Fhir:Coding.system “SNOMEDCT”.
}
Q11. Find child patients who have gotten in hypoglycemia before. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fhir:Person.age? a.
FILTER (?a < 10).
?p fasto:hasHistoryOfHypoglycemia? h.
FILTER (?h > 0).
}
Q12. List all patient currently on fixed insulin regimen and suffered from hyperglycemia condition before. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
fasto:hasHistoryOfHyperglycemia? i.
FILTER (?i > 0)
?prof fasto:hasCarePlan? plan.
?plan fasto:isCurrent “true”^^xsd:Boolean;
fasto:hasInsulinRegimen? ir.
?ir rdf:type fasto:fixedRegimen;
}
Q13. List all patient who have a history of “increasing before bedtime insulin.”
This pattern is inferred using the temporal abstraction of previous sensor data of before bedtime insulin. This abstraction is based on at least the previous 3 consecutive days.
SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:GlucoseBefBT “increasing”^^xsd:string
}
Q14. List all patient having the symptom of shortness of breath.
Symptoms are encoded in SNOMED CT standard terminology.
SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fasto:hasPatientProfile? prof.
?prof fasto:hasSymptom? sym.
?sym fhir:Condition.code? cd.
?cd fhir:Coding? cding;
?cding fhir:Coding.code “267,036,007”^^xsd:string.
Fhir:Coding.display “dyspnea”^^xsd:string.
}
Q15. What are the characteristics of WBAN of patient with identifier X. SELECT? wban,? sub,? lot,? date,? man,? mod WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasWBAN? wban;
?wban ssn:hasSubSystem? sub;
?sub fhir:Device.lotNumber? lot;
fhir:Device.manufactureDate? date;
fhir:Device.manufacturer? man;
fhir:Device.model? mod.
}
Q16. List the current sensor observations for patient X and their values. SELECT? obs? code? quan WHERE {
?p rdf:type fasto:patient;
fhir:Resource.ID? id.
?id fhir:Identifier.value X.
?p fasto:hasPatientProfile? prof.
?prof fasto:hasObservationValue? obs.
?obs rdf:type sensedObservationValue;
fhir:Observation.code? code;
fhir:Observation.valueQuantity? quan;
}
Q17. Find adult patients that are currently on 126,212,009|insulin glargine. SELECT DISTINCT? p WHERE {
?p rdf:type fasto:patient;
fhir:Person.age? a;
fasto:hasPatientProfile? prof.
?prof fasto:hasPatientMedication? med.
?med fhir:MedicationCodeableConcept? s.
?s fhir:Coding? coding.
?coding fhir:Coding.code “126,212,009”^^xsd:string;
fhir:Coding.system “SNOMEDCT”;
Fhir:Coding.display “insulin glargine”^^xsd:string.
FILTER (?a > 19 &&? a < 55)
}