{"name": "bundle-medication-dispense-and-prescription", "comment": "A Bundle of a MedicationRequest and a Medication, each under a urn:uuid, and two dispenses: one naming its drug by reference to that Medication and its prescription by the request's urn:uuid, the record of that entry; one naming its drug by a contained Medication and three prescriptions, the same urn:uuid, a versioned reference on its server and a relative one the document does not hold, each a prescription of its own.", "input": {"file": "fixtures/in/bundle-medication-dispense-and-prescription.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/bundle-medication-dispense-and-prescription.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:1a3c5e70-9b2d-4f48-8a6c-0d2f4b6a8c19\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"id\": \"pat-urn-1\",\n        \"name\": [\n          {\n            \"family\": \"Rivera\",\n            \"given\": [\n              \"Alex\"\n            ]\n          }\n        ],\n        \"gender\": \"female\",\n        \"birthDate\": \"1985-03-15\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:8d2f4a60-3b1c-4e5d-9a7f-1c0b6e8d2f41\",\n      \"resource\": {\n        \"resourceType\": \"MedicationRequest\",\n        \"id\": \"medrx-amlodipine-2\",\n        \"status\": \"active\",\n        \"intent\": \"order\",\n        \"medicationReference\": {\n          \"reference\": \"urn:uuid:5e9c7b13-6a2d-4f80-b1e4-3d7a9c5e1b02\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:1a3c5e70-9b2d-4f48-8a6c-0d2f4b6a8c19\"\n        },\n        \"authoredOn\": \"2026-02-01\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:5e9c7b13-6a2d-4f80-b1e4-3d7a9c5e1b02\",\n      \"resource\": {\n        \"resourceType\": \"Medication\",\n        \"id\": \"med-amlodipine-2\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n              \"code\": \"197361\",\n              \"display\": \"amlodipine 5 MG Oral Tablet\"\n            }\n          ],\n          \"text\": \"Amlodipine 5 mg tablet\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:b7a1d3f5-9c2e-4d60-8e1b-5f3a7c9d2e63\",\n      \"resource\": {\n        \"resourceType\": \"MedicationDispense\",\n        \"id\": \"meddisp-amlodipine-2\",\n        \"status\": \"completed\",\n        \"medicationReference\": {\n          \"reference\": \"urn:uuid:5e9c7b13-6a2d-4f80-b1e4-3d7a9c5e1b02\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:1a3c5e70-9b2d-4f48-8a6c-0d2f4b6a8c19\"\n        },\n        \"authorizingPrescription\": [\n          {\n            \"reference\": \"urn:uuid:8d2f4a60-3b1c-4e5d-9a7f-1c0b6e8d2f41\"\n          }\n        ],\n        \"whenHandedOver\": \"2026-02-03\"\n      }\n    },\n    {\n      \"fullUrl\": \"https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-lisinopril-2\",\n      \"resource\": {\n        \"resourceType\": \"MedicationDispense\",\n        \"id\": \"meddisp-lisinopril-2\",\n        \"contained\": [\n          {\n            \"resourceType\": \"Medication\",\n            \"id\": \"med-lisinopril\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n                  \"code\": \"314076\",\n                  \"display\": \"lisinopril 10 MG Oral Tablet\"\n                }\n              ]\n            }\n          }\n        ],\n        \"status\": \"completed\",\n        \"medicationReference\": {\n          \"reference\": \"#med-lisinopril\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:1a3c5e70-9b2d-4f48-8a6c-0d2f4b6a8c19\"\n        },\n        \"authorizingPrescription\": [\n          {\n            \"reference\": \"urn:uuid:8d2f4a60-3b1c-4e5d-9a7f-1c0b6e8d2f41\"\n          },\n          {\n            \"reference\": \"https://fhir.meridian.example/api/FHIR/R4/MedicationRequest/medrx-lisinopril-3/_history/2\"\n          },\n          {\n            \"reference\": \"MedicationRequest/medrx-lisinopril-4\"\n          }\n        ],\n        \"whenHandedOver\": \"2026-02-04\"\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/bundle-medication-dispense-and-prescription.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/bundle-medication-dispense-and-prescription.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 foaf: <http://xmlns.com/foaf/0.1/> .\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;e_HmdKd6VfjAq-UYCMxpxCmHmCe1-ounT5o9aUJW6WM> foaf:familyName \"Rivera\" ;\n\tfoaf:givenName \"Alex\" ;\n\tcascade:dateOfBirth \"1985-03-15\"^^xsd:date ;\n\tcascade:administrativeGender \"female\" .\n<urn:uuid:00c8e0c1-8634-8e5d-8ccf-32de97648d52> a cascade:PatientProfile ;\n\tcascade:sourceRecordId \"pat-urn-1\" .\n<ni:///sha-256;e_HmdKd6VfjAq-UYCMxpxCmHmCe1-ounT5o9aUJW6WM> prov:specializationOf <urn:uuid:00c8e0c1-8634-8e5d-8ccf-32de97648d52> .\n_:4682a86d864f7e13ac7ab5c87f29c273 bridge:arrivedAs <ni:///sha-256;e_HmdKd6VfjAq-UYCMxpxCmHmCe1-ounT5o9aUJW6WM> ;\n\toa:hasSelector _:363af4d0b1256326c30336c8f65f97df ;\n\toa:hasSource <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasGeneratedBy _:e2dbcffbc5cb0dffc54136e06234de4a .\n_:363af4d0b1256326c30336c8f65f97df a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n<ni:///sha-256;WsP_vJH60aPRum5pOlnt7wzESoN79y6xb8_xWASSWts> cascade:prescribedOrReported \"prescribed\" ;\n\tcascade:drugName \"Amlodipine 5 mg tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/197361> ;\n\tcascade:workflowStatus \"active\" ;\n\tcascade:medicationRequestIntent \"order\" ;\n\tcascade:prescriptionWrittenDate \"2026-02-01\"^^xsd:date .\n<urn:uuid:dee32982-0cfe-8b32-a3a5-29ff0589e5cc> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceRecordId \"medrx-amlodipine-2\" .\n<ni:///sha-256;WsP_vJH60aPRum5pOlnt7wzESoN79y6xb8_xWASSWts> prov:specializationOf <urn:uuid:dee32982-0cfe-8b32-a3a5-29ff0589e5cc> ;\n\tcascade:patient <urn:uuid:00c8e0c1-8634-8e5d-8ccf-32de97648d52> .\n_:ec3772bbc6cf90df9d677893969c7d1f bridge:arrivedAs <ni:///sha-256;WsP_vJH60aPRum5pOlnt7wzESoN79y6xb8_xWASSWts> ;\n\toa:hasSelector _:ccc20b2099a6ccd3eee291fd4419fa95 ;\n\toa:hasSource <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasGeneratedBy _:e2dbcffbc5cb0dffc54136e06234de4a .\n_:ccc20b2099a6ccd3eee291fd4419fa95 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;f1nTZHUhbcHXBKiFYpwkicW8jRyCAwMuMIyRfH-WTUU> cascade:authorizingPrescription <urn:uuid:dee32982-0cfe-8b32-a3a5-29ff0589e5cc> ;\n\tcascade:dispenseHandedOverTime \"2026-02-03\"^^xsd:date ;\n\tcascade:drugName \"Amlodipine 5 mg tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/197361> ;\n\tcascade:workflowStatus \"completed\" .\n<urn:uuid:163afdb2-be77-8cbc-a911-0d6b66843906> a cascade:MedicationDispense ;\n\tcascade:sourceRecordId \"meddisp-amlodipine-2\" .\n<ni:///sha-256;f1nTZHUhbcHXBKiFYpwkicW8jRyCAwMuMIyRfH-WTUU> prov:specializationOf <urn:uuid:163afdb2-be77-8cbc-a911-0d6b66843906> ;\n\tcascade:patient <urn:uuid:00c8e0c1-8634-8e5d-8ccf-32de97648d52> .\n_:e68de466bb8107786d181e87dd69aa62 bridge:arrivedAs <ni:///sha-256;f1nTZHUhbcHXBKiFYpwkicW8jRyCAwMuMIyRfH-WTUU> ;\n\toa:hasSelector _:71b5b68a7cfc1be758f1228647614d4 ;\n\toa:hasSource <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasGeneratedBy _:e2dbcffbc5cb0dffc54136e06234de4a .\n_:71b5b68a7cfc1be758f1228647614d4 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/3\" .\n<ni:///sha-256;HeCdMJ99mAVh8r3tecJqn6xnCDlefTs4Y3AAVHpWSA8> cascade:authorizingPrescription <urn:uuid:b19d7b46-6516-8eab-80db-bb0a3fb87f47> , <urn:uuid:28a7d2b7-46f9-8fac-8228-a1a3cd280082> , <urn:uuid:dee32982-0cfe-8b32-a3a5-29ff0589e5cc> ;\n\tcascade:dispenseHandedOverTime \"2026-02-04\"^^xsd:date ;\n\tcascade:drugName \"lisinopril 10 MG Oral Tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/314076> ;\n\tcascade:workflowStatus \"completed\" .\n<urn:uuid:484e44a1-aa66-8103-9da1-95598c45e4e2> a cascade:MedicationDispense ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-lisinopril-2> ;\n\tcascade:sourceRecordId \"meddisp-lisinopril-2\" .\n<ni:///sha-256;HeCdMJ99mAVh8r3tecJqn6xnCDlefTs4Y3AAVHpWSA8> prov:specializationOf <urn:uuid:484e44a1-aa66-8103-9da1-95598c45e4e2> ;\n\tcascade:patient <urn:uuid:00c8e0c1-8634-8e5d-8ccf-32de97648d52> .\n_:df9548ae73626b9d37ba17d811f789e9 bridge:arrivedAs <ni:///sha-256;HeCdMJ99mAVh8r3tecJqn6xnCDlefTs4Y3AAVHpWSA8> ;\n\toa:hasSelector _:ce144e90ef37d709f620213708d85600 ;\n\toa:hasSource <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:wasGeneratedBy _:e2dbcffbc5cb0dffc54136e06234de4a .\n_:ce144e90ef37d709f620213708d85600 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/4\" .\n<ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:4aa0a972d8114cd112f7d6901718f801 ;\n\tprov:wasAttributedTo _:56a41aaccfa2d97ab31665db3a0824a7 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:5efe2f2db0c8cdcb00b6d6dfd33779d6 prov:agent _:56a41aaccfa2d97ab31665db3a0824a7 ;\n\tprov:hadRole cascade:AuthorRole .\n_:4aa0a972d8114cd112f7d6901718f801 prov:qualifiedAssociation _:5efe2f2db0c8cdcb00b6d6dfd33779d6 .\n_:611b240a0dbeddb5429d06351dfbece9 prov:agent _:c3a9c5f43d75ad4af160381ea08b29e1 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:4aa0a972d8114cd112f7d6901718f801 prov:qualifiedAssociation _:611b240a0dbeddb5429d06351dfbece9 .\n_:56a41aaccfa2d97ab31665db3a0824a7 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:c3a9c5f43d75ad4af160381ea08b29e1 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:e2dbcffbc5cb0dffc54136e06234de4a <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;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> a prov:Entity .\n_:e2dbcffbc5cb0dffc54136e06234de4a a prov:Activity ;\n\tprov:used <ni:///sha-256;3L1fma_GYlDdXovHCfYTdQsqCc-hfRe3MmQbGEoRmTQ> ;\n\tprov:qualifiedAssociation _:15507d4ce2625acc6563f4a7ddd74e07 .\n_:15507d4ce2625acc6563f4a7ddd74e07 prov:hadPlan _:ba88ce6421d1b01d77d027a4d4b5d566 .\n_:ba88ce6421d1b01d77d027a4d4b5d566 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:15507d4ce2625acc6563f4a7ddd74e07 prov:agent _:b91ddf56b2db41a6327f9b87d5041809 .\n_:b91ddf56b2db41a6327f9b87d5041809 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/bundle-medication-dispense-and-prescription.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/bundle-medication-dispense-and-prescription.ttl", "text": "", "empty": true}}