{"name": "bundle-medication-dispense-repeated-id-and-patient-not-held", "comment": "A Bundle of three MedicationDispenses: two of one id, which a reference to that id cannot tell apart, so each is a finding and each is named from the document; and one whose subject is a urn:uuid no entry holds, which names no patient and is a finding.", "input": {"file": "fixtures/in/bundle-medication-dispense-repeated-id-and-patient-not-held.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/bundle-medication-dispense-repeated-id-and-patient-not-held.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-repeated-1\",\n      \"resource\": {\n        \"resourceType\": \"MedicationDispense\",\n        \"id\": \"meddisp-repeated\",\n        \"status\": \"completed\",\n        \"medicationCodeableConcept\": {\n          \"text\": \"Metformin 500 mg tablet\"\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-conformance-1\"\n        },\n        \"whenHandedOver\": \"2026-01-12\"\n      }\n    },\n    {\n      \"fullUrl\": \"https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-repeated-2\",\n      \"resource\": {\n        \"resourceType\": \"MedicationDispense\",\n        \"id\": \"meddisp-repeated\",\n        \"status\": \"completed\",\n        \"medicationCodeableConcept\": {\n          \"text\": \"Metformin 500 mg tablet\"\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-conformance-1\"\n        },\n        \"whenHandedOver\": \"2026-02-12\"\n      }\n    },\n    {\n      \"fullUrl\": \"https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-stranger-1\",\n      \"resource\": {\n        \"resourceType\": \"MedicationDispense\",\n        \"id\": \"meddisp-stranger-1\",\n        \"status\": \"completed\",\n        \"medicationCodeableConcept\": {\n          \"text\": \"Metformin 500 mg tablet\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:6e8a0c2d-4f5b-4d71-9c3e-7b9d1f3a5c82\"\n        },\n        \"whenHandedOver\": \"2026-03-12\"\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/bundle-medication-dispense-repeated-id-and-patient-not-held.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/bundle-medication-dispense-repeated-id-and-patient-not-held.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;m2kJ99k5WktHgfPvk5WijPc43J28kIo8Tq-F-2kxNlU> cascade:dispenseHandedOverTime \"2026-01-12\"^^xsd:date ;\n\tcascade:drugName \"Metformin 500 mg tablet\" ;\n\tcascade:workflowStatus \"completed\" .\n<urn:uuid:f9740698-5285-89a6-b6d8-e63a1822f1ed> a cascade:MedicationDispense ;\n\tcascade:sourceRecordId \"meddisp-repeated\" .\n<ni:///sha-256;m2kJ99k5WktHgfPvk5WijPc43J28kIo8Tq-F-2kxNlU> prov:specializationOf <urn:uuid:f9740698-5285-89a6-b6d8-e63a1822f1ed> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:c4f9e9422f8f045255dfb5091bd15887 bridge:arrivedAs <ni:///sha-256;m2kJ99k5WktHgfPvk5WijPc43J28kIo8Tq-F-2kxNlU> ;\n\toa:hasSelector _:11c5fd492f591a90064566656dca120e ;\n\toa:hasSource <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasGeneratedBy _:16415e03bcf7e169bd90f0da693f0bd1 .\n_:11c5fd492f591a90064566656dca120e a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n<ni:///sha-256;sxokTCVMW9GJAVjRE8B4E4hBMrfVkFAuPu7G2T5KAw4> cascade:dispenseHandedOverTime \"2026-02-12\"^^xsd:date ;\n\tcascade:drugName \"Metformin 500 mg tablet\" ;\n\tcascade:workflowStatus \"completed\" .\n<urn:uuid:cbfd5964-f2bd-8f75-9a01-7ec0e5caec2d> a cascade:MedicationDispense ;\n\tcascade:sourceRecordId \"meddisp-repeated\" .\n<ni:///sha-256;sxokTCVMW9GJAVjRE8B4E4hBMrfVkFAuPu7G2T5KAw4> prov:specializationOf <urn:uuid:cbfd5964-f2bd-8f75-9a01-7ec0e5caec2d> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:ed73c7972c9560b72ab9ca0621568f1a bridge:arrivedAs <ni:///sha-256;sxokTCVMW9GJAVjRE8B4E4hBMrfVkFAuPu7G2T5KAw4> ;\n\toa:hasSelector _:2339b7953b7ed243d3a978e30545122c ;\n\toa:hasSource <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasGeneratedBy _:16415e03bcf7e169bd90f0da693f0bd1 .\n_:2339b7953b7ed243d3a978e30545122c a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;mekVBUxmqYNRsoJ0jCrKVxUZe29-6J0MPAU9Z0N3phk> cascade:dispenseHandedOverTime \"2026-03-12\"^^xsd:date ;\n\tcascade:drugName \"Metformin 500 mg tablet\" ;\n\tcascade:workflowStatus \"completed\" .\n<urn:uuid:857298c6-e412-8455-a875-6c08c93a0d60> a cascade:MedicationDispense ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationDispense/meddisp-stranger-1> ;\n\tcascade:sourceRecordId \"meddisp-stranger-1\" .\n<ni:///sha-256;mekVBUxmqYNRsoJ0jCrKVxUZe29-6J0MPAU9Z0N3phk> prov:specializationOf <urn:uuid:857298c6-e412-8455-a875-6c08c93a0d60> .\n_:fefb78d3970c8f6a60af7d11d0c3bb02 bridge:arrivedAs <ni:///sha-256;mekVBUxmqYNRsoJ0jCrKVxUZe29-6J0MPAU9Z0N3phk> ;\n\toa:hasSelector _:d41c945acfeb65a7027383c1a9eebb3f ;\n\toa:hasSource <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasDerivedFrom <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:wasGeneratedBy _:16415e03bcf7e169bd90f0da693f0bd1 .\n_:d41c945acfeb65a7027383c1a9eebb3f a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n<ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:6c704a51b17f1f1784c68cb84830ba71 ;\n\tprov:wasAttributedTo _:1966297ab31bcc582a2e820faf7addae ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:a83befc8d36803c943cf909e62d3ae63 prov:agent _:1966297ab31bcc582a2e820faf7addae ;\n\tprov:hadRole cascade:AuthorRole .\n_:6c704a51b17f1f1784c68cb84830ba71 prov:qualifiedAssociation _:a83befc8d36803c943cf909e62d3ae63 .\n_:45f345d54e74a50e72a80c6324ebac0f prov:agent _:30867c9b5d87fb89bff274705ead10bf ;\n\tprov:hadRole cascade:TransmitterRole .\n_:6c704a51b17f1f1784c68cb84830ba71 prov:qualifiedAssociation _:45f345d54e74a50e72a80c6324ebac0f .\n_:1966297ab31bcc582a2e820faf7addae <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:30867c9b5d87fb89bff274705ead10bf <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:16415e03bcf7e169bd90f0da693f0bd1 <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;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> a prov:Entity .\n_:16415e03bcf7e169bd90f0da693f0bd1 a prov:Activity ;\n\tprov:used <ni:///sha-256;tnGDDFVCwq3_oSGBSOzrbLUCWszGQkVPdMhtHTBHVy4> ;\n\tprov:qualifiedAssociation _:32fbdbb72f7219c3f1af9818d22c67b9 .\n_:32fbdbb72f7219c3f1af9818d22c67b9 prov:hadPlan _:9c5d6e2901e2eda2652730d93e8b8430 .\n_:9c5d6e2901e2eda2652730d93e8b8430 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:32fbdbb72f7219c3f1af9818d22c67b9 prov:agent _:273cad27ea719fbbcd6deb086734a89a .\n_:273cad27ea719fbbcd6deb086734a89a 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-repeated-id-and-patient-not-held.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/bundle-medication-dispense-repeated-id-and-patient-not-held.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_:d91aaa63c2097aeb4ec7c91391568e65 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n_:a0cb743f7d0f4dccf52de99a468ce698 oa:hasSource <../in/bundle-medication-dispense-repeated-id-and-patient-not-held.json> .\n_:d91aaa63c2097aeb4ec7c91391568e65 oa:refinedBy _:dbf0ec999a10ccf65aa55ff85dd656cf .\n_:dbf0ec999a10ccf65aa55ff85dd656cf a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/id\" .\n_:a0cb743f7d0f4dccf52de99a468ce698 oa:hasSelector _:d91aaa63c2097aeb4ec7c91391568e65 .\n_:dd57d740006dcafd909a21c7cd09e6fd oa:hasTarget _:a0cb743f7d0f4dccf52de99a468ce698 ;\n\tsh:resultSeverity sh:Info ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:resourceIdRepeated ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"meddisp-repeated\" .\n_:e87beb4eeafccc4ee47cc4b5d0ed77a2 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n_:f1108e96848af0f0cc5d76934ea95d7a oa:hasSource <../in/bundle-medication-dispense-repeated-id-and-patient-not-held.json> .\n_:e87beb4eeafccc4ee47cc4b5d0ed77a2 oa:refinedBy _:f106332e7b36000c1e7c7883772399 .\n_:f106332e7b36000c1e7c7883772399 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/id\" .\n_:f1108e96848af0f0cc5d76934ea95d7a oa:hasSelector _:e87beb4eeafccc4ee47cc4b5d0ed77a2 .\n_:a35ab852a6ee37d5f7a4f4f99ca25d58 oa:hasTarget _:f1108e96848af0f0cc5d76934ea95d7a ;\n\tsh:resultSeverity sh:Info ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:resourceIdRepeated ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"meddisp-repeated\" .\n_:ab7d7d19b7ca60c4095c4781f892d7b8 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n_:db4bf310d6773710c9c489a42612b43b oa:hasSource <../in/bundle-medication-dispense-repeated-id-and-patient-not-held.json> .\n_:ab7d7d19b7ca60c4095c4781f892d7b8 oa:refinedBy _:cff891997ced20589ec96f242c10c2bd .\n_:cff891997ced20589ec96f242c10c2bd a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/subject/reference\" .\n_:db4bf310d6773710c9c489a42612b43b oa:hasSelector _:ab7d7d19b7ca60c4095c4781f892d7b8 .\n_:da35c5e7527a85ac1fb8864fcb201a78 oa:hasTarget _:db4bf310d6773710c9c489a42612b43b ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:referenceNotHeld ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"urn:uuid:6e8a0c2d-4f5b-4d71-9c3e-7b9d1f3a5c82\" .\n", "empty": false}}