# Template for N3 document
# Allows use of unprefixed names instead of :name style names
# @prefix : <#>.
# #
# @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
# @prefix skos: <http://www.w3.org/2004/02/skos/core#>.
# @prefix owl: <http://www.w3.org/2002/07/owl#>.
# @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
# @prefix dc: <http://http://purl.org/dc/terms/>.
# @prefix foaf: <http://xmlns.com/foaf/0.1/>.
# @prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
@prefix term: <term:/> .
@prefix units: <units:/> .
# @prefix : <tag:eric@w3.org:2009/tmo/translator#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix trans: <tag:eric@w3.org:2009/tmo/translator#> .
@prefix indivo: <http://indivo.org/vocab/xml/documents#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cpr: <http://purl.org/cpr/0.75#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ro: <http://www.obofoundry.org/ro/ro.owl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dct: <http://purl.org/dc/terms/> .
#
# Identify the document
# =====================================================================
# 12345678 - MM DIAGNOSTIC DIGITAL BILAT
# Patient: Mary Kay SMITH -- History #AB98765
# BILATERAL DIGITAL DIAGNOSTIC MAMMOGRAM POST LUMPECTOMY MAMMOGRAM:
# 1/1/2009
# CLINICAL: 611.72 Lump Or Mass In Breast-611.72 Patient with palpable
# abnormality in left breast. Post left lumpectomy. Recent MRI
# demonstrated suspicious lesions in left breast.
# ---------------------------------------------------------------------
# to make this more English-like, I give the document a name; "theDocument"
<> a cpr:patient-record .
_:patient cpr:subjectOfDescription <> .
_:patient a cpr:patient ;
cpr:patientID "AB98765" ;
foaf:name "Mary Kay Smith" ;
foaf:givenName "Mary Kay" ;
foaf:familyName "Smith" ;
trans:demographics [
# indivo:dateOfBirth "??"^^xsd:date ;
indivo:gender "Female" ]
.
_:theRadiologist a trans:Radiologist ;
foaf:name "Kenneth Kirk" ;
foaf:givenName "Kenneth" ;
foaf:familyName "Kirk" .
_:theClinic a trans:Practice ;
trans:practiceName "Acme Hospital" .
_:patient trans:hasCondition [
# cpr:startsNoLaterThan "2009-05-15T12:00:00"^^xsd:dateTime ;
dct:label "LUMP OR MASS IN BREAST" ;
trans:diagnosedWith term:BreastLump ;
trans:ICD9 "410" ;
] .
_:patient trans:hasCondition [
# cpr:startsNoLaterThan "2009-05-15T12:00:00"^^xsd:dateTime ;
dct:label "palpable abnormality in left breast" ;
trans:diagnosedWith term:Abnormality ;
term:location [ a term:Breast ; term:laterality term:left ] ; # @@new - inBodyOf?
trans:ICD9 "@@" ;
] .
_:patient trans:procedure [
# cpr:startsNoLaterThan "2009-05-15T12:00:00"^^xsd:dateTime ;
dct:label "Post left lumpectomy" ;
trans:codeProcedure term:CompletedLumpectomy ; # @@new
term:location [ a term:Breast ; term:laterality term:left ] ; # @@new
trans:ICD9 "@@" ;
] .
[ a trans:Encounter ;
trans:patient _:patient ;
trans:physician _:theRadiologist ;
trans:dateOfEncounter "2009-01-01"^^xsd:date ;
trans:workingDiagnosis term:SuspiciousForMalignancy ;
trans:reportedSymptoms "false" ;
trans:test [
a term:Mammogram ;
indivo:dateMeasured "2009-01-01"^^xsd:date ;
trans:testName "BILATERAL DIGITAL DIAGNOSTIC MAMMOGRAM POST LUMPECTOMY MAMMOGRAM" ;
trans:result [
a term:MammogramReport ;
term:diagnosticCategory term:SuspiciousForMalignancy ;
term:ICD9 "611.72" ; # "Lump or mass in breast"
dct:author [foaf:name "Jenny Jones"] ;
trans:referredClinic _:theClinic ;
term:finding [ # see theMassAt1 below
rdfs:label "fine linear and pleomorphic calcifications" ;
# @@ coded calcifications
term:location [ a term:Breast ; term:laterality term:left ; term:position "1:00"^^units:clock];# new
term:size [ term:x "3.1"^^units:cm ; term:y "3.1"^^units:cm ]
] ;
term:finding [ # not listed below
rdfs:label "hypoechoic mass with related calcification" ;
term:location [ a term:Breast ; term:laterality term:left ; term:position "2:00"^^units:clock];# new
term:size [ term:x "8"^^units:cm ; term:y "8"^^units:cm ]
] ;
term:finding [ # see theMassAt9 below
rdfs:label "spiculated margin" ;
term:location [ a term:Breast ; term:laterality term:left ; term:position "9:00"^^units:clock];# new
term:size [ term:x "1.2"^^units:cm ; term:y "1.3"^^units:cm ]
]
]
] ;
] .
term:SuspiciousForMalignancy dct:identifier "Suspicious for Malignancy" .
[ a trans:Encounter ;
trans:patient _:patient ;
trans:physician _:theRadiologist ;
# after trans:dateOfEncounter "2009-01-01"^^xsd:date ; ?
trans:workingDiagnosis term:InvasiveAdenocarcinoma ;
trans:workingDiagnosis term:DuctalCarcinoma ;
trans:reportedSymptoms "false" ;
trans:test [
a term:Biopsy ;
# after indivo:dateMeasured "2009-01-01"^^xsd:date ; ?
trans:testName "ULTRASOUND GUIDED NEEDLE CORE BIOPSY" ;
trans:result [
a term:PathologyReport ;
term:diagnosticCategory term:SuspiciousForMalignancy ;
term:ICD9 "611.72" ; # "Lump or mass in breast"
# dc:author [foaf:name "John Madden"] ;
trans:referredClinic _:theClinic ;
term:finding [
rdfs:label "DUCTAL CRIBRIFORM CARCINOMA IN SITU WITH MICROCALCIFICATIONS" ;
# @@ coded calcifications "MICROCALCIFICATIONS: PRESENT IN ASSOCIATION WITH DCIS"
term:location [ a term:Breast ; term:laterality term:left ; term:position "1:00"^^units:clock];# new
term:scale [ term:nuclearGradeOfInSituCarcinoma "2"^^term:NuclearGradeOfInSituCarcinomaOF3 ] ;
] ;
# hey, what happened to the 2:00 mass?
term:finding [
rdfs:label "INVASIVE DUCTAL ADENOCARCINOMA" ;
term:location [ a term:Breast ; term:laterality term:left ; term:position "9:00"^^units:clock];# new
term:scale [ term:nottinghamCombinedHistologicGrade "2"^^term:NottinghamCombinedHistologicGradeOF3 ] ;
term:scale [ term:nuclearGradeOfInSituCarcinoma "2"^^term:NuclearGradeOfInSituCarcinomaOF3 ] ;
]
]
] ;
] .
term:InvasiveAdenocarcinoma dct:identifier "Invasive Adenocarcinoma" .
term:DuctalCarcinoma dct:identifier "Ductal Carcinoma" .
# I haven't TMO-coded the following stuff from the N3 coding. - EGP 2011-05-10
# <http://theHospital.example/2009/01/01/12345678>
#
#
# theFinding-4 dc:label "Recent MRI demonstrated suspicious lesion in left breast"; = {thePatient :finding [a MRI; :result theMRIResult]}.
# theMRIResult = {thePatient :finding [a Lesion; inBodyOf thePatient; :significance :Suspicious]}.
# .
# # the Description is best modeled using an "on-the-fly" vocabulary
# aPriorMammomgram = [a MammogramReport; dated "2008-01-01"^^xsd:date; ].
# aPriorBiopsy = [a UltrasoundBiopsyReport; dated "2007-01-01"^^xsd:date].
# theDocument :part [= theDiagnosis; a Diagnosis; dc:author theRadiologist].
# theRadiologist performs [a Comparison; between theDiagnosis, aPriorMammogram, aPriorBiopsy].
# # or, theComparison is among (theDiagnosis, aPriorMammogram, aPriorBiopsy).
# thePatient :has [a RightBreast; = theRightBreast], [a LeftBreast; = theLeftBreast].
# bothBreasts = (theRightBreast, theLeftBreast).
#
# # Now it gets really interesting
# # do I model this as a finding, or as a fact?
# # also, how many findings are there in the report? 1, 2, many?
# # here I've modeled it as a single finding, which is shared by both breasts
# theRightBreast :finding someFibroglandularElements.
# theLeftBreast :finding someFibroglandularElements.
# someFibroglandularElements = [a Finding; a [a owl:Restriction; owl:onProperty refersTo; owl:minCardinality 2]].
# # this is an interesting statement, in that it uses a
# someFibroglandularElements :qualifier scattered.
# # or if you want to get fancy, you could say, "the finding is of >1 fibroglandular element", something like this:
#
#
#
# # here's more from the CSHALS:
#
# # it's hard to imagine a medical document so elementary
# 
## that it wouldn't reference at least
# 
## two (2) non-identical entities!
#
# 

theMassAt9 a Mass.

# theMassAt1 a Mass.

# theMassAt9 owl:differentFrom theMassAt1.
# 
theSpecimen contains theMassAt9, theMassAt1.
#
# # or, saving a line
#
# theSpecimen contains [a Mass; = theMassAt9].

#
# # theSpecimen contains [a Mass; = theMassAt1].
#
# theMassAt9 owl:differentFrom theMassAt1.
#
# # in fact, you might want to collect all instances

# # that you define and declare an owl:AllDifferent class
# 
# [a owl:AllDifferent] owl:distinctMembers
 (theRadiologist, thePatient, 
 theMassAt9, theMassAt1… ).
 

#
#
# <http://theHospital.example/2009/01/01/12345678>
# foaf:topic thePatient.
# thePatient a Patient.
# Patient a skos:Concept.
# # later add whatever mapping axioms you want

# # (we favor using SKOS whenever possible)...
# Patient skos:broader foaf:Person;
 skos:closeMatch snomed:378243823, radlex:347439845,
 loinc:473878943.
#
# # or even add more forceful axioms

# # (but beware of "ontological overcommitment")...
# Patient rdfs:subClassOf dc:Agent;
 owl:equivalentClass gom:Patient.
#
#
# # these are pretty commonplace assertion types

# # hard to imagine much structural variation here

# # can pick a specific vocabulary later
#
# # more sketchy, depends on chosen anatomy vocabulary

#
# # very sketchy
# 
# these are modeled loosey-goosey as value partitions
# 
# need no idea how e.g. Radlex might do this
#
# 
theMassAt9 shape round.
# 
theMassAt9 margin indistinct.
# 
theMassAt9 echogenicity isoechoic.
#
#
# # I (radiologist) am suspicious for malignancy.
# theRadiologist suspects [a Malignancy].
#
# # This mammogram is suspicious for malignancy.
# {theMammogram shows [a Malignancy]} urw:hasUncertainty highProbability.
#
# # The findings are suspicious for malignancy.
# theLesion hasFeature X, Y.
{theLesion hasFeature X, Y} suggests {thePatient :has [a Malignancy]}.
#
# # The mass is suspicious for malignancy.
# theMass hasAppearance malignantAppearance.
#
# # The patient's category is Suspicious for Malignancy.
# thePatient diagnosticCategory SuspiciousForMalignancy.
#
# # The diagnosis is: "Suspicious for Malignancy".
# theDiagnosis = "Suspicious for Malignancy".
#
# # The diagnosis category is Suspicious for Malignancy.
# theDiagnosis :diagnosticCategory SuspiciousForMalignancy.
#
# # The report category is Suspicious for Malignancy.
# <http://theHospital.example/2009/01/01/12345678>
#
# # This patient should be managed according to the
# 
# applicable Suspicious for Malignancy protocol.
# # ???????
#
#
# # end more from the CSHALS
#
#
# # =====================================================================
# # INTERNAL AXIOMS: Some assertions regarding the document-only resources in
# # this interpretation
# Patient rdf:subClassOf foaf:Person.
# Patient a skos:Concept;
# skos:label "patient".
# MammogramReport a foaf:Document.
#
#
# # =====================================================================
# # BACKGROUND AXIOMS: Some assertions regarding the background knowledge
# # assumed by the interpreter (i.e. me, not the author)