{"name": "bundle-patient-reference-relative-to-urn", "comment": "A Patient held under a urn:uuid fullUrl, and two Conditions referencing Patient/<id>: one from an entry whose fullUrl is a urn:uuid, one to the Patient held under a urn:uuid. FHIR gives a [type]/[id] no meaning there, so neither names a patient, and each carries a finding.", "input": {"file": "fixtures/in/bundle-patient-reference-relative-to-urn.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/bundle-patient-reference-relative-to-urn.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:8a1c3e5f-2b4d-4f60-9a7b-1c2d3e4f5b01\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"id\": \"p1\",\n        \"name\": [{ \"family\": \"Okafor\", \"given\": [\"Martin\"] }],\n        \"birthDate\": \"1979-02-08\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:8a1c3e5f-2b4d-4f60-9a7b-1c2d3e4f5b02\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"id\": \"c1\",\n        \"code\": {\n          \"coding\": [{ \"system\": \"http://snomed.info/sct\", \"code\": \"38341003\", \"display\": \"Hypertensive disorder\" }],\n          \"text\": \"Hypertension\"\n        },\n        \"subject\": { \"reference\": \"Patient/other\" }\n      }\n    },\n    {\n      \"fullUrl\": \"https://fhir.meridian.example/api/FHIR/R4/Condition/c2\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"id\": \"c2\",\n        \"code\": {\n          \"coding\": [{ \"system\": \"http://snomed.info/sct\", \"code\": \"44054006\", \"display\": \"Diabetes mellitus type 2\" }],\n          \"text\": \"Type 2 diabetes\"\n        },\n        \"subject\": { \"reference\": \"Patient/p1\" }\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/bundle-patient-reference-relative-to-urn.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/bundle-patient-reference-relative-to-urn.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;uWB9HAgVgegGL1ve33hUahSf2VXe8zleB2tWBV23vuU> foaf:familyName \"Okafor\" ;\n\tfoaf:givenName \"Martin\" ;\n\tcascade:dateOfBirth \"1979-02-08\"^^xsd:date .\n<urn:uuid:a8978366-0522-84ea-b86f-6505930c3ad7> a cascade:PatientProfile ;\n\tcascade:sourceRecordId \"p1\" .\n<ni:///sha-256;uWB9HAgVgegGL1ve33hUahSf2VXe8zleB2tWBV23vuU> prov:specializationOf <urn:uuid:a8978366-0522-84ea-b86f-6505930c3ad7> .\n_:9e3bb10b792e9f9f3ad090f3180dc161 bridge:arrivedAs <ni:///sha-256;uWB9HAgVgegGL1ve33hUahSf2VXe8zleB2tWBV23vuU> ;\n\toa:hasSelector _:e9057d72f02fdb732f19c865efc535c3 ;\n\toa:hasSource <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasDerivedFrom <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasGeneratedBy _:18b12fad8c0209f61cd0fefb529caebf .\n_:e9057d72f02fdb732f19c865efc535c3 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n<ni:///sha-256;yuilqDPp7eklPSLRj5HoAiIBiHGuHyRZvmyQfi00OwA> cascade:conditionName \"Hypertension\" ;\n\tcascade:conditionCode <http://snomed.info/id/38341003> .\n<urn:uuid:835e10fc-b041-82ba-af4f-a3e1054dd807> a cascade:ProblemOrDiagnosis ;\n\tcascade:sourceRecordId \"c1\" .\n<ni:///sha-256;yuilqDPp7eklPSLRj5HoAiIBiHGuHyRZvmyQfi00OwA> prov:specializationOf <urn:uuid:835e10fc-b041-82ba-af4f-a3e1054dd807> .\n_:53582891b1ce6b2758ce3ac19579490d bridge:arrivedAs <ni:///sha-256;yuilqDPp7eklPSLRj5HoAiIBiHGuHyRZvmyQfi00OwA> ;\n\toa:hasSelector _:33a845d0d80e26ad4efafd1fb4555c4a ;\n\toa:hasSource <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasDerivedFrom <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasGeneratedBy _:18b12fad8c0209f61cd0fefb529caebf .\n_:33a845d0d80e26ad4efafd1fb4555c4a a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;VK3sIjoGejhrfk6tbn0OMVwBPVCtyZj5KLqEfufexVM> cascade:conditionName \"Type 2 diabetes\" ;\n\tcascade:conditionCode <http://snomed.info/id/44054006> .\n<urn:uuid:db7db3bc-8e86-855c-8b09-174934ba8f29> a cascade:ProblemOrDiagnosis ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/Condition/c2> ;\n\tcascade:sourceRecordId \"c2\" .\n<ni:///sha-256;VK3sIjoGejhrfk6tbn0OMVwBPVCtyZj5KLqEfufexVM> prov:specializationOf <urn:uuid:db7db3bc-8e86-855c-8b09-174934ba8f29> .\n_:1f0ac4c309b8825084f9db002075fd54 bridge:arrivedAs <ni:///sha-256;VK3sIjoGejhrfk6tbn0OMVwBPVCtyZj5KLqEfufexVM> ;\n\toa:hasSelector _:4d73b4a520bf39b336881b88f42c3d27 ;\n\toa:hasSource <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasDerivedFrom <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:wasGeneratedBy _:18b12fad8c0209f61cd0fefb529caebf .\n_:4d73b4a520bf39b336881b88f42c3d27 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n<ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:4f80502ae0c4492a6e71bd084f6ce1eb ;\n\tprov:wasAttributedTo _:c59a9ae415c34f0d2267cb2dce2c469c ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:45d84a86d7a445d3771474eefe0a349e prov:agent _:c59a9ae415c34f0d2267cb2dce2c469c ;\n\tprov:hadRole cascade:AuthorRole .\n_:4f80502ae0c4492a6e71bd084f6ce1eb prov:qualifiedAssociation _:45d84a86d7a445d3771474eefe0a349e .\n_:1c87a5dc2004da023ea9e807de4e18db prov:agent _:9996a7e2f2c736040846613bfc802084 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:4f80502ae0c4492a6e71bd084f6ce1eb prov:qualifiedAssociation _:1c87a5dc2004da023ea9e807de4e18db .\n_:c59a9ae415c34f0d2267cb2dce2c469c <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:9996a7e2f2c736040846613bfc802084 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:18b12fad8c0209f61cd0fefb529caebf <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;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> a prov:Entity .\n_:18b12fad8c0209f61cd0fefb529caebf a prov:Activity ;\n\tprov:used <ni:///sha-256;Igku0XehAsCdsVO88UWWKCFAvwnBcqECa2a7bdukfOg> ;\n\tprov:qualifiedAssociation _:38b344ecccd2f664ee5946b294f34b8b .\n_:38b344ecccd2f664ee5946b294f34b8b prov:hadPlan _:4cef5f1e8f79eb5fb4852018279bae73 .\n_:4cef5f1e8f79eb5fb4852018279bae73 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:38b344ecccd2f664ee5946b294f34b8b prov:agent _:6b160261513a9c34d8fc3cd23b853d25 .\n_:6b160261513a9c34d8fc3cd23b853d25 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-patient-reference-relative-to-urn.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/bundle-patient-reference-relative-to-urn.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_:a631f6b943c9ef5e6ea259a2295bd317 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n_:cc51fa1c4f5e0deaf68186005e309c07 oa:hasSource <../in/bundle-patient-reference-relative-to-urn.json> .\n_:a631f6b943c9ef5e6ea259a2295bd317 oa:refinedBy _:ee448b834825a1b11eebab915cea69bc .\n_:ee448b834825a1b11eebab915cea69bc 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_:cc51fa1c4f5e0deaf68186005e309c07 oa:hasSelector _:a631f6b943c9ef5e6ea259a2295bd317 .\n_:ba9f1d52a9e06b91b1422c166f6b6718 oa:hasTarget _:cc51fa1c4f5e0deaf68186005e309c07 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:referenceRelativeUndefined ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Patient/other\" .\n_:df698c5e721abbd9c6e7b28cff723616 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n_:e4713abd44b467e0cf9d718068c260ce oa:hasSource <../in/bundle-patient-reference-relative-to-urn.json> .\n_:df698c5e721abbd9c6e7b28cff723616 oa:refinedBy _:aa2494d93c5e06147aa7be16d3cbc484 .\n_:aa2494d93c5e06147aa7be16d3cbc484 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_:e4713abd44b467e0cf9d718068c260ce oa:hasSelector _:df698c5e721abbd9c6e7b28cff723616 .\n_:b0018e4867c1b5e9726e48d772ec6d60 oa:hasTarget _:e4713abd44b467e0cf9d718068c260ce ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:referenceRelativeUndefined ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Patient/p1\" .\n", "empty": false}}