Skip to content

Commit

Permalink
Merge pull request #647 from edmcouncil/GitHub-646
Browse files Browse the repository at this point in the history
Updated 2 of the CMC UC CQs to reflect ontology revisions
  • Loading branch information
mereolog authored Jan 20, 2025
2 parents ec5bca2 + 90f54c3 commit 9d8e8fd
Show file tree
Hide file tree
Showing 14 changed files with 955 additions and 539 deletions.
5 changes: 3 additions & 2 deletions etc/CQ/Example/uc2_cq2-1.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ WHERE {
BIND( uc2_cq2-1_parameter_1 AS $SellalbeArticle )

$AuthorizedMedicinalProduct cmns-rlcmp:isPlayedBy $SellalbeArticle .
$AuthorizedMedicinalProduct idmp-mprd:hasAuthorization $Authorization .
?hasAuthorization rdfs:subPropertyOf idmp-mprd:hasAuthorization .
$AuthorizedMedicinalProduct ?hasAuthorization $Authorization .
$Authorization cmns-cxtdsg:isApplicableIn ?Jurisdiction .
?MarketingAuthorizationNumber cmns-id:identifies $Authorization
?MarketingAuthorizationNumber cmns-id:identifies $Authorization .

# Optionally, get the name of the Authorization Number
OPTIONAL{?MarketingAuthorizationNumber rdfs:label ?MarketingAuthorizationNumberLabel }
Expand Down
35 changes: 17 additions & 18 deletions etc/CQ/Example/uc_cmc_cq2.sparql
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# UC-CMC-CQ 2: Which manufacturing site <site> is producing which medicinal product <m>? – FDA would ask for this in the application
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX cmns-rlcmp: <https://www.omg.org/spec/Commons/RolesAndCompositions/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-mprd: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11615-MedicinalProducts/>
PREFIX idmp-spor: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/SubstancesProductsOrganisationsReferentials/>
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 ?medicinalProduct ?site

WHERE {
?medicinalProduct a idmp-mprd:MedicinalProduct .
?medicinalProduct idmp-mprd:isProducedAtManufacturingSite ?site .
?site a idmp-mprd:ManufacturingSite .
# UC-CMC-CQ 2: Which manufacturing site <site> is producing which medicinal product <m>? – FDA would ask for this in the application
PREFIX cmns-doc: <https://www.omg.org/spec/Commons/Documents/>
PREFIX idmp-mprd: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11615-MedicinalProducts/>
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 ?medicinalProduct ?physicalMedicinalProduct ?site

WHERE {
?medicinalProduct a idmp-mprd:MedicinalProduct .
?medicinalProduct cmns-doc:specifies ?physicalMedicinalProduct .
?physicalMedicinalProduct a idmp-mprd:PhysicalMedicinalProduct .
?physicalMedicinalProduct idmp-mprd:isProducedAtManufacturingSite ?site .
?site a idmp-mprd:ManufacturingSite .

}
51 changes: 25 additions & 26 deletions etc/CQ/Example/uc_cmc_cq3.sparql
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# UC-CMC-CQ 3: Which manufacturing site <site> is producing which substance <substance>?
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX cmns-rlcmp: <https://www.omg.org/spec/Commons/RolesAndCompositions/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-mprd: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11615-MedicinalProducts/>
PREFIX idmp-spor: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/SubstancesProductsOrganisationsReferentials/>
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#>
PREFIX cmns-col: <https://www.omg.org/spec/Commons/Collections/>


SELECT DISTINCT ?site ?substance

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

$medicinalProduct idmp-mprd:isProducedAtManufacturingSite ?site .
?site a idmp-mprd:ManufacturingSite .

$medicinalProduct cmns-col:comprises ?pharmaceuticalOrManufacturedProduct.
?pharmaceuticalOrManufacturedProduct cmns-col:comprises ?substance.
?substance rdf:type/rdfs:subClassOf idmp-sub:Substance.
# UC-CMC-CQ 3: Which manufacturing site <site> is producing which substance <substance>?
PREFIX cmns-col: <https://www.omg.org/spec/Commons/Collections/>
PREFIX cmns-doc: <https://www.omg.org/spec/Commons/Documents/>
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 ?site ?substance

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

$medicinalProduct cmns-doc:specifies ?physicalMedicinalProduct .
?physicalMedicinalProduct a idmp-mprd:PhysicalMedicinalProduct .
?physicalMedicinalProduct idmp-mprd:isProducedAtManufacturingSite ?site .
?site a idmp-mprd:ManufacturingSite .

$medicinalProduct cmns-col:comprises ?pharmaceuticalOrManufacturedProduct .
?pharmaceuticalOrManufacturedProduct cmns-col:comprises ?substance .
?substance rdf:type/rdfs:subClassOf idmp-sub:Substance .

}
30 changes: 30 additions & 0 deletions etc/CQ/Example/uc_cmc_cq4.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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/>
PREFIX cmns-id: <https://www.omg.org/spec/Commons/Identifiers/>
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 ?productBatchIdentifierValue

WHERE {
# Bind Variable medicinal product <$medicinalProduct>
# Example for Norvasc: <https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>
BIND(uc_cmc_cq4_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.
}
36 changes: 36 additions & 0 deletions etc/CQ/Example/uc_cmc_cq5.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# UC-CMC-CQ 5: Which material <m> is approved in which country <c> ? and what is the application ID?

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

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 )

$medicinalProduct cmns-doc:specifies ?physicalMedicinalProduct .
?physicalMedicinalProduct a idmp-mprd:PhysicalMedicinalProduct .
?productBatch cmns-col:isConstituentOf ?physicalMedicinalProduct .
?productBatch rdf:type idmp-mprd:Batch .
?productBatch cmns-col:comprises ?material .
?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.
}
38 changes: 38 additions & 0 deletions etc/CQ/Example/uc_cmc_cq6.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# UC-CMC-CQ 6: Which batch <b> is released for which country <c>?
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 ?productBatchIdentifierValue ?marketingAuthorisationId ?country

WHERE {
# Bind Variable medicinal product <$medicinalProduct>
# Example for Norvasc: <https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>
BIND(uc_cmc_cq6_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-col:comprises ?material .
?productBatch cmns-dsg:isSignifiedBy ?productBatchId .
?productBatchId cmns-txt:hasTextValue ?productBatchIdentifierValue.

?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.
}
20 changes: 19 additions & 1 deletion etc/unit_tests/configs/idmp_tests_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,22 @@ uc_cmc_cq3_tests:
sparql_template: "cq_templates/uc_cmc_cq3.sparql"
parameters:
uc_cmc_cq3_parameter_1: "<https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>"
expected_output: "cq_expected_results/IDMP/uc_cmc_cq3_expected_results.json"
expected_output: "cq_expected_results/IDMP/uc_cmc_cq3_expected_results.json"

uc_cmc_cq4_tests:
sparql_template: "cq_templates/uc_cmc_cq4.sparql"
parameters:
uc_cmc_cq4_parameter_1: "<https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>"
expected_output: "cq_expected_results/IDMP/uc_cmc_cq4_expected_results.json"

uc_cmc_cq5_tests:
sparql_template: "cq_templates/uc_cmc_cq5.sparql"
parameters:
uc_cmc_cq5_parameter_1: "<https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>"
expected_output: "cq_expected_results/IDMP/uc_cmc_cq5_expected_results.json"

uc_cmc_cq6_tests:
sparql_template: "cq_templates/uc_cmc_cq6.sparql"
parameters:
uc_cmc_cq6_parameter_1: "<https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/NorvascMedicinalProduct>"
expected_output: "cq_expected_results/IDMP/uc_cmc_cq6_expected_results.json"
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,33 @@
},
"Jurisdiction": {
"type": "uri",
"value": "https://www.omg.org/spec/LCC/Countries/ISO3166-1-CountryCodes/Germany"
"value": "https://www.omg.org/spec/Commons/EuropeanJurisdiction/WesternEuropeGovernmentEntitiesAndJurisdictions/JurisdictionOfGermany"
},
"MarketingAuthorizationNumberName": {
"type": "literal",
"value": "marketing authorization number EMEA/H/A-30/1288"
},
"JurisdictionName": {
"type": "literal",
"value": "Deutschland",
"xml:lang": "de"
"value": "German jurisdiction"
}
},
{
"MarketingAuthorizationNumber": {
"type": "uri",
"value": "https://spec.pistoiaalliance.org/idmp/ontology/EXT/Examples/AmlodipineExample/MarketingAuthorizationNumber-19787-S3"
},
"Jurisdiction": {
"type": "uri",
"value": "https://www.omg.org/spec/Commons/NorthAmericanJurisdiction/USGovernmentEntitiesAndJurisdictions/UnitedStatesJurisdiction"
},
"MarketingAuthorizationNumberName": {
"type": "literal",
"value": "marketing authorization number 19787 - S3"
},
"JurisdictionName": {
"type": "literal",
"value": "United States jurisdiction"
}
}
]
Expand Down
Loading

0 comments on commit 9d8e8fd

Please sign in to comment.