{"name": "medication-request-every-mapped-element", "comment": "A MedicationRequest carrying every element in/sparql/medication.rq reads of a request: one medication, a prescription, its dosage a node holding its frequency, period, period unit, SNOMED CT route and dose.", "input": {"file": "fixtures/in/medication-request-every-mapped-element.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/medication-request-every-mapped-element.json", "text": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"id\": \"medrx-atorvastatin-1\",\n  \"meta\": {\n    \"versionId\": \"2\",\n    \"lastUpdated\": \"2026-03-02T09:15:00Z\"\n  },\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      \"text\": \"Take 1 tablet by mouth at bedtime.\",\n      \"timing\": {\n        \"repeat\": {\n          \"frequency\": 1,\n          \"period\": 1,\n          \"periodUnit\": \"d\"\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"26643006\",\n            \"display\": \"Oral route\"\n          }\n        ]\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  \"note\": [\n    {\n      \"text\": \"Recheck lipid panel in three months.\"\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/medication-request-every-mapped-element.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/medication-request-every-mapped-element.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;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I> cascade:structuredDosage <ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I#dosage-1> .\n<ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I#dosage-1> cascade:dosageRepeatFrequency 1 ;\n\tcascade:dosageRepeatPeriodUnit \"d\" ;\n\tcascade:dosageRouteCode <http://snomed.info/id/26643006> ;\n\tcascade:dosageDoseQuantity <ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I#dosage-1-dose-quantity> .\n<ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I#dosage-1-dose-quantity> cascade:decimalValue \"1\"^^xsd:decimal ;\n\tcascade:writtenValue \"1\" ;\n\tcascade:unitText \"tablet\" .\n<ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I#dosage-1> cascade:dosageRepeatPeriod \"1\"^^xsd:decimal .\n<ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I> 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 at bedtime.\" .\n<urn:uuid:e10d33f4-5d5b-889d-8c36-c05a9850a9e8> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationRequest/medrx-atorvastatin-1> ;\n\tcascade:sourceRecordId \"medrx-atorvastatin-1\" .\n<ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I> prov:specializationOf <urn:uuid:e10d33f4-5d5b-889d-8c36-c05a9850a9e8> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:2b881369323c9de430978131a3327941 bridge:arrivedAs <ni:///sha-256;zdVSpGw8JW84xCXCgQOxbx2FuzJNkvNa-7wPfiULN9I> ;\n\tpav:version \"2\" ;\n\tpav:lastUpdateOn \"2026-03-02T09:15:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:fec98762f2838c4074c4cf9968d33b55 ;\n\toa:hasSource <ni:///sha-256;7bBazRJX5AEBT89SGpRxHvZ20pzhKXPs8CexzvUAWg8> ;\n\tprov:wasDerivedFrom <ni:///sha-256;7bBazRJX5AEBT89SGpRxHvZ20pzhKXPs8CexzvUAWg8> ;\n\tprov:wasGeneratedBy _:fcb3e046b697cdaa2cfb977db368d22a .\n_:fec98762f2838c4074c4cf9968d33b55 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;7bBazRJX5AEBT89SGpRxHvZ20pzhKXPs8CexzvUAWg8> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedFrom <https://FHIR.Meridian.example/api/FHIR/R4/MedicationRequest/medrx-atorvastatin-1> ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:e77d368659ab67ee9766cfac1fb2d003 ;\n\tprov:wasAttributedTo _:b4814a7f245bad42b82337a0d92ff929 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:21073e43314a991ebb9235a27f40e56 prov:agent _:b4814a7f245bad42b82337a0d92ff929 ;\n\tprov:hadRole cascade:AuthorRole .\n_:e77d368659ab67ee9766cfac1fb2d003 prov:qualifiedAssociation _:21073e43314a991ebb9235a27f40e56 .\n_:571d7b81ad746543bff715122cd4dca7 prov:agent _:d4e330d0d9093faf10e40a420a9a0808 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:e77d368659ab67ee9766cfac1fb2d003 prov:qualifiedAssociation _:571d7b81ad746543bff715122cd4dca7 .\n_:b4814a7f245bad42b82337a0d92ff929 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:d4e330d0d9093faf10e40a420a9a0808 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:fcb3e046b697cdaa2cfb977db368d22a <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;7bBazRJX5AEBT89SGpRxHvZ20pzhKXPs8CexzvUAWg8> a prov:Entity .\n_:fcb3e046b697cdaa2cfb977db368d22a a prov:Activity ;\n\tprov:used <ni:///sha-256;7bBazRJX5AEBT89SGpRxHvZ20pzhKXPs8CexzvUAWg8> ;\n\tprov:qualifiedAssociation _:c74da2e46be9d08808e97b5c81949a1 .\n_:c74da2e46be9d08808e97b5c81949a1 prov:hadPlan _:fb0278cd045982596b2135cedca2c355 .\n_:fb0278cd045982596b2135cedca2c355 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:c74da2e46be9d08808e97b5c81949a1 prov:agent _:d02a0687b2191c99d562594912283165 .\n_:d02a0687b2191c99d562594912283165 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-every-mapped-element.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/medication-request-every-mapped-element.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_:b8f5d86eb081720a3698e206e3ab9ebf a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:a8872b021d6e201617e9b871f922ec51 oa:hasSource <../in/medication-request-every-mapped-element.json> .\n_:b8f5d86eb081720a3698e206e3ab9ebf oa:refinedBy _:dc2ad35ffa1a91f7591d36994b0414f0 .\n_:dc2ad35ffa1a91f7591d36994b0414f0 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/note/0/text\" .\n_:a8872b021d6e201617e9b871f922ec51 oa:hasSelector _:b8f5d86eb081720a3698e206e3ab9ebf .\n_:f1700e0c85c431803f4112461d9b9d9d oa:hasTarget _:a8872b021d6e201617e9b871f922ec51 .\n_:a535bcbc4ea54b752f9c7aaee8e2e33a a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:b1a065406ddb0984150ef955b211ba65 oa:hasSource <../in/medication-request-every-mapped-element.json> .\n_:a535bcbc4ea54b752f9c7aaee8e2e33a oa:refinedBy _:f21dedaa34ff4aab991d895dbc51c3e4 .\n_:f21dedaa34ff4aab991d895dbc51c3e4 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_:b1a065406ddb0984150ef955b211ba65 oa:hasSelector _:a535bcbc4ea54b752f9c7aaee8e2e33a .\n_:d1771cf70994db156d516eb9cfab9378 oa:hasTarget _:b1a065406ddb0984150ef955b211ba65 .\n_:f1700e0c85c431803f4112461d9b9d9d sh:resultSeverity sh:Info .\n_:d1771cf70994db156d516eb9cfab9378 sh:resultSeverity sh:Info .\n_:f1700e0c85c431803f4112461d9b9d9d a oa:Annotation ;\n\toa:hasBody fhirr4:medicationNote ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Recheck lipid panel in three months.\" .\n_:d1771cf70994db156d516eb9cfab9378 a oa:Annotation ;\n\toa:hasBody fhirr4:doseUnitCodeOutsideUcum ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"TAB\" .\n", "empty": false}}