1. @prefix : . 2. @prefix owl: . 3. @prefix rdf: . 4. @prefix xml: . 5. @prefix xsd: . 6. @prefix rdfs: . 7. @prefix fhir: . 8. 9. ###################### Ontology ######################## 10. a owl:Ontology . 11. 12. fhir:AllergyIntolerance.status a owl:DatatypeProperty . 13. 14. fhir:datatypes.code a owl:Class . 15. 16. fhir:AllergyIntoleranceStatusConfirmed a owl:Class ; 17. owl:equivalentClass 18. [ owl:onProperty fhir:AllergyIntolerance.status ; 19. owl:hasValue "confirmed" ] ; 20. rdfs:subClassOf fhir:datatypes.code . 21. 22. ################### Instance Data ##################### 23. :confirmed1 fhir:AllergyIntolerance.status "confirmed" . 24. _:confirmed2 fhir:AllergyIntolerance.status "confirmed" . 25. 26. ################## Desired Entailments #################### 27. 28. ### This one shows up in Protege: 29. # :confirmed1 a fhir:AllergyIntoleranceStatusConfirmed . 30. 31. ### This one is not shown in Protege, but the section below 32. ### demonstrates that the reasoner *is* making this inference: 33. # _:confirmed2 a fhir:AllergyIntoleranceStatusConfirmed . 34. 35. ########################################################## 36. ############## Propagating inference upward ############## 37. ########################################################## 38. # These lines are used to detect whether the desired inference 39. # is being made, even if it is not directly shown. 40. fhir:ConfirmedUpward a owl:Class ; 41. owl:equivalentClass 42. [ owl:onProperty fhir:upward ; 43. owl:someValuesFrom fhir:AllergyIntoleranceStatusConfirmed ] . 44. 45. fhir:upward a owl:ObjectProperty . 46. 47. :up1 fhir:upward :confirmed1 . 48. :up2 fhir:upward _:confirmed2 . 49. 50. ############ Desired entailments ############ 51. 52. ### These both show up in Protege, demonstrating the inference *does* 53. ### work with blank nodes: 54. # :up1 a fhir:ConfirmedUpward 55. # :up2 a fhir:ConfirmedUpward 56.