{"name": "medication-request-supply-and-dosages", "comment": "A MedicationRequest carrying every supply and dosage element medication-supply-and-dosages.rq reads: a course of therapy, a dispensing window, no refill, a supply duration, and two dosages, each a node, the first with its bounds, its timing, an NCI Thesaurus route and two doses; the dispense quantity, the timing's when, the second dose and the second dosage's text are findings.", "input": {"file": "fixtures/in/medication-request-supply-and-dosages.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/medication-request-supply-and-dosages.json", "text": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"id\": \"medrx-atorvastatin-4\",\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  \"courseOfTherapyType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy\",\n        \"code\": \"continuous\",\n        \"display\": \"Continuous long term therapy\"\n      }\n    ]\n  },\n  \"dosageInstruction\": [\n    {\n      \"text\": \"Take 1 tablet by mouth twice a day, in the morning and the evening.\",\n      \"timing\": {\n        \"repeat\": {\n          \"boundsPeriod\": {\n            \"start\": \"2026-03-02T08:00-05:00\",\n            \"end\": \"2026-09-02\"\n          },\n          \"frequency\": 2,\n          \"period\": 1,\n          \"periodUnit\": \"d\",\n          \"when\": [\n            \"MORN\",\n            \"EVE\"\n          ]\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl\",\n            \"code\": \"C38288\",\n            \"display\": \"ORAL\"\n          }\n        ]\n      },\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 1,\n            \"unit\": \"tablet\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"{tbl}\"\n          }\n        },\n        {\n          \"doseQuantity\": {\n            \"value\": 2,\n            \"unit\": \"tablet\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"{tbl}\"\n          }\n        }\n      ]\n    },\n    {\n      \"text\": \"Take 1 extra tablet if a dose is missed.\"\n    }\n  ],\n  \"dispenseRequest\": {\n    \"validityPeriod\": {\n      \"start\": \"2026-03-02\",\n      \"end\": \"2027-03-02\"\n    },\n    \"numberOfRepeatsAllowed\": 0,\n    \"quantity\": {\n      \"value\": 60,\n      \"unit\": \"tablet\",\n      \"system\": \"http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm\",\n      \"code\": \"TAB\"\n    },\n    \"expectedSupplyDuration\": {\n      \"value\": 30,\n      \"unit\": \"days\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"d\"\n    }\n  }\n}\n"}, "expectedGraph": {"file": "fixtures/expected/medication-request-supply-and-dosages.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/medication-request-supply-and-dosages.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;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> cascade:courseOfTherapyType \"continuous\" ;\n\tcascade:numberOfRepeatsAllowed 0 ;\n\tcascade:structuredDosage <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-2> , <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1> .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1> cascade:dosageRepeatFrequency 2 ;\n\tcascade:dosageRepeatPeriodUnit \"d\" ;\n\tcascade:dosageRouteCodeInOtherSystem \"C38288\"^^<http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl> .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> cascade:dispenseRequestValidityPeriodEnd \"2027-03-02\"^^xsd:date ;\n\tcascade:dispenseRequestValidityPeriodStart \"2026-03-02\"^^xsd:date .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1> cascade:dosageBoundsPeriodEnd \"2026-09-02\"^^xsd:date ;\n\tcascade:dosageBoundsPeriodStart \"2026-03-02T08:00:00-05:00\"^^xsd:dateTime ;\n\tcascade:paddedDateTime <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1-padded-dosageBoundsPeriodStart> .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1-padded-dosageBoundsPeriodStart> cascade:paddedDateTimeProperty cascade:dosageBoundsPeriodStart ;\n\tcascade:timeAsWritten \"2026-03-02T08:00-05:00\" .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> cascade:expectedSupplyDuration <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#expected-supply-duration> .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#expected-supply-duration> cascade:decimalValue \"30\"^^xsd:decimal ;\n\tcascade:writtenValue \"30\" ;\n\tcascade:ucumUnit \"d\" ;\n\tcascade:unitText \"days\" .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1> cascade:dosageDoseQuantity <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1-dose-quantity> .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1-dose-quantity> cascade:decimalValue \"1\"^^xsd:decimal ;\n\tcascade:writtenValue \"1\" ;\n\tcascade:ucumUnit \"{tbl}\" ;\n\tcascade:unitText \"tablet\" .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8#dosage-1> cascade:dosageRepeatPeriod \"1\"^^xsd:decimal .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> 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\tcascade:dosageInstructionText \"Take 1 tablet by mouth twice a day, in the morning and the evening.\" .\n<urn:uuid:a9431e69-c364-80c0-8309-c6e7aa5e627e> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationRequest/medrx-atorvastatin-4> ;\n\tcascade:sourceRecordId \"medrx-atorvastatin-4\" .\n<ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> prov:specializationOf <urn:uuid:a9431e69-c364-80c0-8309-c6e7aa5e627e> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:b53c966daef219a5dd9257a724f0faed bridge:arrivedAs <ni:///sha-256;6zqdCDeSozGdOmAUhIsj9E2uuph09EPeOYCrwG_rDP8> ;\n\toa:hasSelector _:3e46fc0563c21b0f3e8d518be0b2595d ;\n\toa:hasSource <ni:///sha-256;Ns_3Wp6m8DbS4CnbRsZcTD7mO3Q4-pQwYeKZ_wvVe5I> ;\n\tprov:wasDerivedFrom <ni:///sha-256;Ns_3Wp6m8DbS4CnbRsZcTD7mO3Q4-pQwYeKZ_wvVe5I> ;\n\tprov:wasGeneratedBy _:8be02c6d626f4159b3493bbf861be686 .\n_:3e46fc0563c21b0f3e8d518be0b2595d a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;Ns_3Wp6m8DbS4CnbRsZcTD7mO3Q4-pQwYeKZ_wvVe5I> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:b5d76a49aa01d7b16a05373fe8e3c8af ;\n\tprov:wasAttributedTo _:4637b110744ffd6551b5d6e5528f7647 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:4b59d145acff5a42b0c06b9e23c95131 prov:agent _:4637b110744ffd6551b5d6e5528f7647 ;\n\tprov:hadRole cascade:AuthorRole .\n_:b5d76a49aa01d7b16a05373fe8e3c8af prov:qualifiedAssociation _:4b59d145acff5a42b0c06b9e23c95131 .\n_:3b840fe60c3a2f27e16feabcecaa2856 prov:agent _:a91da77a4ea2658f611df34170a89684 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:b5d76a49aa01d7b16a05373fe8e3c8af prov:qualifiedAssociation _:3b840fe60c3a2f27e16feabcecaa2856 .\n_:4637b110744ffd6551b5d6e5528f7647 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:a91da77a4ea2658f611df34170a89684 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:8be02c6d626f4159b3493bbf861be686 <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;Ns_3Wp6m8DbS4CnbRsZcTD7mO3Q4-pQwYeKZ_wvVe5I> a prov:Entity .\n_:8be02c6d626f4159b3493bbf861be686 a prov:Activity ;\n\tprov:used <ni:///sha-256;Ns_3Wp6m8DbS4CnbRsZcTD7mO3Q4-pQwYeKZ_wvVe5I> ;\n\tprov:qualifiedAssociation _:d22a6929842bc7478e5b5e23d8d3337c .\n_:d22a6929842bc7478e5b5e23d8d3337c prov:hadPlan _:13e1352ad1352f9364320d710c19f333 .\n_:13e1352ad1352f9364320d710c19f333 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:d22a6929842bc7478e5b5e23d8d3337c prov:agent _:3abdf151b205fa757c8d77c151d4e25b .\n_:3abdf151b205fa757c8d77c151d4e25b 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-supply-and-dosages.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/medication-request-supply-and-dosages.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_:c09e0ba17979a50749508b31401f8477 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:a59f49bbe0ae51052a08960d62cbea9f a oa:Annotation ;\n\toa:hasTarget _:c08b885df583ba502717a1257b9e1b2c .\n_:c08b885df583ba502717a1257b9e1b2c oa:hasSource <../in/medication-request-supply-and-dosages.json> ;\n\toa:hasSelector _:c09e0ba17979a50749508b31401f8477 .\n_:a59f49bbe0ae51052a08960d62cbea9f 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_:a0ea1e3fa6cca403eef1da145a3e6bfa a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:e514d2108a7fb5b55f9e4d8822576410 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/0/timing/repeat/when/0\" .\n_:a0ea1e3fa6cca403eef1da145a3e6bfa oa:refinedBy _:e514d2108a7fb5b55f9e4d8822576410 .\n_:dcf887599f49cabbc712ad0ec4937635 a oa:Annotation ;\n\toa:hasTarget _:f912b8e49e4038acdbe4cf39bc178f7b .\n_:f912b8e49e4038acdbe4cf39bc178f7b oa:hasSource <../in/medication-request-supply-and-dosages.json> ;\n\toa:hasSelector _:a0ea1e3fa6cca403eef1da145a3e6bfa .\n_:dcf887599f49cabbc712ad0ec4937635 oa:hasBody fhirr4:dosageElementNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"/dosageInstruction/timing/repeat/when\" ;\n\t<https://ns.cascadeprotocol.org/cascade#occurrenceCount> 2 ;\n\tsh:resultSeverity sh:Info .\n_:fe0d86ef03a2ba8e37003d2e6bff2ec a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:e223ec23f01958d14b4871e7b4179f2d a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dispenseRequest/quantity\" .\n_:fe0d86ef03a2ba8e37003d2e6bff2ec oa:refinedBy _:e223ec23f01958d14b4871e7b4179f2d .\n_:b2cbd8c8f82a0aed6ff18fe69944d1da a oa:Annotation ;\n\toa:hasTarget _:bbaf59f4c3c0674d326242cc41665064 .\n_:bbaf59f4c3c0674d326242cc41665064 oa:hasSource <../in/medication-request-supply-and-dosages.json> ;\n\toa:hasSelector _:fe0d86ef03a2ba8e37003d2e6bff2ec .\n_:b2cbd8c8f82a0aed6ff18fe69944d1da oa:hasBody fhirr4:dispenseQuantityNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"/dispenseRequest/quantity\" ;\n\tsh:resultSeverity sh:Info .\n_:a241a9e161a6c1d7ba1f4313ab683285 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:c86cf83806c674f9371112d03e41ae7e oa:hasSource <../in/medication-request-supply-and-dosages.json> .\n_:a241a9e161a6c1d7ba1f4313ab683285 oa:refinedBy _:d575af18ee7ae4416cc42b9835853ffb .\n_:d575af18ee7ae4416cc42b9835853ffb a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/1/text\" .\n_:c86cf83806c674f9371112d03e41ae7e oa:hasSelector _:a241a9e161a6c1d7ba1f4313ab683285 .\n_:b0348502ff1bbd0464394964cf4cfdf3 oa:hasTarget _:c86cf83806c674f9371112d03e41ae7e .\n_:ccda87dc280bdc237136106c6ea8600f a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:de1798c9faa66da0ede53bce0ca0f17a oa:hasSource <../in/medication-request-supply-and-dosages.json> .\n_:ccda87dc280bdc237136106c6ea8600f oa:refinedBy _:c0619a765366569fac113db05009c91e .\n_:c0619a765366569fac113db05009c91e a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/dosageInstruction/0/doseAndRate/1/doseQuantity/value\" .\n_:de1798c9faa66da0ede53bce0ca0f17a oa:hasSelector _:ccda87dc280bdc237136106c6ea8600f .\n_:bceaac049ece93042ec71a51d23eaa05 oa:hasTarget _:de1798c9faa66da0ede53bce0ca0f17a .\n_:b0348502ff1bbd0464394964cf4cfdf3 sh:resultSeverity sh:Warning .\n_:bceaac049ece93042ec71a51d23eaa05 sh:resultSeverity sh:Info .\n_:b0348502ff1bbd0464394964cf4cfdf3 a oa:Annotation ;\n\toa:hasBody fhirr4:medicationDosageRepeated ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Take 1 extra tablet if a dose is missed.\" .\n_:bceaac049ece93042ec71a51d23eaa05 a oa:Annotation ;\n\toa:hasBody fhirr4:dosageElementNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"2\" .\n", "empty": false}}