{"name": "medication-request-dose-quantity-not-carried", "comment": "A MedicationRequest of three dosages whose dose quantity is not carried as written: a unit code in a system other than UCUM is a fhirr4:doseUnitCodeOutsideUcum finding, a comparator, which FHIR's SimpleQuantity forbids, writes no dose node and is a fhirr4:dosageElementNotCarried finding, and a value that is no number writes none and is a fhirr4:medicationNumberNotCarried finding.", "input": {"file": "fixtures/in/medication-request-dose-quantity-not-carried.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/medication-request-dose-quantity-not-carried.json", "text": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"id\": \"medrx-atorvastatin-8\",\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n        \"code\": \"617312\",\n        \"display\": \"atorvastatin calcium 10 MG Oral Tablet\"\n      }\n    ],\n    \"text\": \"Atorvastatin 10 mg tablet\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-conformance-1\"\n  },\n  \"authoredOn\": \"2026-03-02\",\n  \"dosageInstruction\": [\n    {\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 1,\n            \"unit\": \"tablet\",\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm\",\n            \"code\": \"TAB\"\n          }\n        }\n      ]\n    },\n    {\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"comparator\": \"<\",\n            \"value\": 2,\n            \"unit\": \"mg\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"mg\"\n          }\n        }\n      ]\n    },\n    {\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": \"one\",\n            \"unit\": \"tablet\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"{tbl}\"\n          }\n        }\n      ]\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/medication-request-dose-quantity-not-carried.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/medication-request-dose-quantity-not-carried.ttl", "text": "@prefix bridge: <https://ns.cascadeprotocol.org/bridge/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix cascade: <https://ns.cascadeprotocol.org/cascade#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n@prefix prov: <http://www.w3.org/ns/prov#> .\n@prefix dct: <http://purl.org/dc/terms/> .\n@prefix dcterms: <http://purl.org/dc/terms/> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n@prefix pav: <http://purl.org/pav/> .\n<ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc> cascade:structuredDosage <ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-3> , <ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-2> , <ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-1> .\n<ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-1> cascade:dosageDoseQuantity <ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-1-dose-quantity> .\n<ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc#dosage-1-dose-quantity> cascade:decimalValue \"1\"^^xsd:decimal ;\n\tcascade:writtenValue \"1\" ;\n\tcascade:unitText \"tablet\" .\n<ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc> cascade:prescribedOrReported \"prescribed\" ;\n\tcascade:drugName \"Atorvastatin 10 mg tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/617312> ;\n\tcascade:workflowStatus \"active\" ;\n\tcascade:medicationRequestIntent \"order\" ;\n\tcascade:prescriptionWrittenDate \"2026-03-02\"^^xsd:date .\n<urn:uuid:a392bd2a-dea6-84dc-8ac1-95c4d6a9a605> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationRequest/medrx-atorvastatin-8> ;\n\tcascade:sourceRecordId \"medrx-atorvastatin-8\" .\n<ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc> prov:specializationOf <urn:uuid:a392bd2a-dea6-84dc-8ac1-95c4d6a9a605> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:b70a9c48b1fa68987043e8211c0a46c3 bridge:arrivedAs <ni:///sha-256;DhCoxLAJ5ojgOVc1Nyijyr7MpD26-ORnbD3CnhPpxtc> ;\n\toa:hasSelector _:e5b5a792934fa73259057e50095c2508 ;\n\toa:hasSource <ni:///sha-256;aipNkvVQIS0QME_5zYxzotbN5t_5_DJ1nr7N5f56WDQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;aipNkvVQIS0QME_5zYxzotbN5t_5_DJ1nr7N5f56WDQ> ;\n\tprov:wasGeneratedBy _:48ef587b1abe75d205f7fa1e0b12150f .\n_:e5b5a792934fa73259057e50095c2508 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;aipNkvVQIS0QME_5zYxzotbN5t_5_DJ1nr7N5f56WDQ> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:36071110cb7896e94938a4f77d67952 ;\n\tprov:wasAttributedTo _:f5f22d0dd1850e3c3d33537d0fd79e05 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:c0747efd7b630db047760f78d973cadd prov:agent _:f5f22d0dd1850e3c3d33537d0fd79e05 ;\n\tprov:hadRole cascade:AuthorRole .\n_:36071110cb7896e94938a4f77d67952 prov:qualifiedAssociation _:c0747efd7b630db047760f78d973cadd .\n_:d9b5613ea429958d153005a32a79006b prov:agent _:7ce8097b88cc0ccd0599bee9aa76b4fd ;\n\tprov:hadRole cascade:TransmitterRole .\n_:36071110cb7896e94938a4f77d67952 prov:qualifiedAssociation _:d9b5613ea429958d153005a32a79006b .\n_:f5f22d0dd1850e3c3d33537d0fd79e05 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:7ce8097b88cc0ccd0599bee9aa76b4fd <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:48ef587b1abe75d205f7fa1e0b12150f <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health export\" ;\n\tprov:startedAtTime \"2026-09-01T10:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;aipNkvVQIS0QME_5zYxzotbN5t_5_DJ1nr7N5f56WDQ> a prov:Entity .\n_:48ef587b1abe75d205f7fa1e0b12150f a prov:Activity ;\n\tprov:used <ni:///sha-256;aipNkvVQIS0QME_5zYxzotbN5t_5_DJ1nr7N5f56WDQ> ;\n\tprov:qualifiedAssociation _:919fc0e96721f301e9ea10d583f19f8a .\n_:919fc0e96721f301e9ea10d583f19f8a prov:hadPlan _:4d5d9b1ac5664c4f001f669bd8541863 .\n_:4d5d9b1ac5664c4f001f669bd8541863 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:919fc0e96721f301e9ea10d583f19f8a prov:agent _:def64a9a44949af34263d1abd947e0db .\n_:def64a9a44949af34263d1abd947e0db a prov:SoftwareAgent ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"Cascade Bridge for Rust\" ;\n\tpav:version \"0.1.0\" .\n"}, "expectedFindings": {"file": "fixtures/findings/medication-request-dose-quantity-not-carried.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/medication-request-dose-quantity-not-carried.ttl", "text": "@prefix fhirr4: <https://ns.cascadeprotocol.org/adapter/fhir-r4/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix sh: <http://www.w3.org/ns/shacl#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n_:fbcaf9125ea1b6761662a8d66d4200f4 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:e94263ed1ab7094a3e5736b779e8f26b a oa:Annotation ;\n\toa:hasTarget _:dba6f9af0cefb80b3e1e02fb46b51cd5 .\n_:dba6f9af0cefb80b3e1e02fb46b51cd5 oa:hasSource <../in/medication-request-dose-quantity-not-carried.json> ;\n\toa:hasSelector _:fbcaf9125ea1b6761662a8d66d4200f4 .\n_:e94263ed1ab7094a3e5736b779e8f26b oa:hasBody <https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-6.28> ;\n\toa:motivatedBy oa:classifying ;\n\tsh:resultSeverity sh:Violation .\n_:de955c87648fb923d927b4d326a41160 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:dc2cdcc2ecbc32e60d2de2f54ff895bf a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/1/doseAndRate/0/doseQuantity/comparator\" .\n_:de955c87648fb923d927b4d326a41160 oa:refinedBy _:dc2cdcc2ecbc32e60d2de2f54ff895bf .\n_:be0171e082f2e3acff34c7a3caad9b14 a oa:Annotation ;\n\toa:hasTarget _:ee178d67f7fa8f76d2a63026fc7ed56c .\n_:ee178d67f7fa8f76d2a63026fc7ed56c oa:hasSource <../in/medication-request-dose-quantity-not-carried.json> ;\n\toa:hasSelector _:de955c87648fb923d927b4d326a41160 .\n_:be0171e082f2e3acff34c7a3caad9b14 oa:hasBody fhirr4:dosageElementNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"/dosageInstruction/doseAndRate/doseQuantity/comparator\" ;\n\tsh:resultSeverity sh:Info .\n_:aa3599478b8feece07bdbf7ec91a5102 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:d78a893e3da16d60ca0ada0c002e6bf3 oa:hasSource <../in/medication-request-dose-quantity-not-carried.json> .\n_:aa3599478b8feece07bdbf7ec91a5102 oa:refinedBy _:cca463103ecaff4183917035e7ffc770 .\n_:cca463103ecaff4183917035e7ffc770 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/2/doseAndRate/0/doseQuantity/value\" .\n_:d78a893e3da16d60ca0ada0c002e6bf3 oa:hasSelector _:aa3599478b8feece07bdbf7ec91a5102 .\n_:b8099a08a881d00bd56612907d8bf94c oa:hasTarget _:d78a893e3da16d60ca0ada0c002e6bf3 .\n_:e9d1a22a1d9955be206841b0745e662 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:dd8f8e06ad5c2987fa74fa4af9413bc8 oa:hasSource <../in/medication-request-dose-quantity-not-carried.json> .\n_:e9d1a22a1d9955be206841b0745e662 oa:refinedBy _:b17b345cc34dc4fe0c64496983b3d01e .\n_:b17b345cc34dc4fe0c64496983b3d01e a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/0/doseAndRate/0/doseQuantity/code\" .\n_:dd8f8e06ad5c2987fa74fa4af9413bc8 oa:hasSelector _:e9d1a22a1d9955be206841b0745e662 .\n_:f36eaa92f52c6a5aefbfa4f86d1a930b oa:hasTarget _:dd8f8e06ad5c2987fa74fa4af9413bc8 .\n_:b8099a08a881d00bd56612907d8bf94c sh:resultSeverity sh:Warning .\n_:f36eaa92f52c6a5aefbfa4f86d1a930b sh:resultSeverity sh:Info .\n_:b8099a08a881d00bd56612907d8bf94c a oa:Annotation ;\n\toa:hasBody fhirr4:medicationNumberNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"one\" .\n_:f36eaa92f52c6a5aefbfa4f86d1a930b a oa:Annotation ;\n\toa:hasBody fhirr4:doseUnitCodeOutsideUcum ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"TAB\" .\n", "empty": false}}