Skip to content

Commit

Permalink
fix to uc_cmc_cq4
Browse files Browse the repository at this point in the history
Signed-off-by: mereolog <[email protected]>
  • Loading branch information
mereolog committed Jan 20, 2025
1 parent f5c5a7a commit 3e61059
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion etc/CQ/Example/uc_cmc_cq4.sparql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# UC-CMC-CQ 3: Which material ID <m> is used in which batch ID <b>?
# UC-CMC-CQ 4: Which material ID <m> is used in which batch ID <b>?
PREFIX cmns-col: <https://www.omg.org/spec/Commons/Collections/>
PREFIX cmns-doc: <https://www.omg.org/spec/Commons/Documents/>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
Expand Down
17 changes: 5 additions & 12 deletions etc/CQ/Example/uc_cmc_cq5.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,29 @@
PREFIX cmns-col: <https://www.omg.org/spec/Commons/Collections/>
PREFIX cmns-doc: <https://www.omg.org/spec/Commons/Documents/>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX cmns-cxtdsg: <https://www.omg.org/spec/Commons/ContextualDesignators/>
PREFIX cmns-id: <https://www.omg.org/spec/Commons/Identifiers/>
PREFIX cmns-rlcmp: <https://www.omg.org/spec/Commons/RolesAndCompositions/>
PREFIX cmns-rga: <https://www.omg.org/spec/Commons/RegulatoryAgencies/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-mprd: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11615-MedicinalProducts/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT DISTINCT ?materialIdentifierValue ?marketingAuthorisationId ?country
SELECT DISTINCT ?productBatchIdentifierValue ?productBatchId

WHERE {
# Bind Variable medicinal product <$medicinalProduct>
# Example for Norvasc: <https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>
BIND(uc_cmc_cq5_parameter_1 AS $medicinalProduct )
BIND(uc_cmc_cq3_parameter_1 AS $medicinalProduct )

$medicinalProduct cmns-doc:specifies ?physicalMedicinalProduct .
?physicalMedicinalProduct a idmp-mprd:PhysicalMedicinalProduct .
?productBatch cmns-col:isConstituentOf ?physicalMedicinalProduct .
?productBatch rdf:type idmp-mprd:Batch .
?productBatch cmns-dsg:isSignifiedBy ?productBatchId .
?productBatchId cmns-txt:hasTextValue ?productBatchIdentifierValue.
?productBatch cmns-col:comprises ?material .
?material cmns-id:isIdentifiedBy ?materialIdentifierIRI .
?materialIdentifierIRI rdf:type idmp-sub:MaterialIdentifier.
?materialIdentifierIRI cmns-txt:hasTextValue ?materialIdentifierValue.

?authorisedMedicinalProduct cmns-rlcmp:isPlayedBy $medicinalProduct .
?authorisedMedicinalProduct idmp-mprd:isAuthorizedForMarketingThrough ?marketingAuthorisation .
?marketingAuthorisationId cmns-id:identifies ?marketingAuthorisation .

?marketingAuthorisation cmns-cxtdsg:isApplicableIn ?jurisdiction .
?jurisdiction cmns-rga:hasReach ?country .
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"head" : {
"vars" : [
"materialIdentifierValue",
"productBatchIdentifierValue",
"productBatchId"
]
},
"results" : {
"bindings" : [
{
"materialIdentifierValue" : {
"productBatchIdentifierValue" : {
"type" : "literal",
"value" : "MAT006"
"value" : "B123455"
},
"productBatchId" : {
"type" : "uri",
Expand Down

0 comments on commit 3e61059

Please sign in to comment.