{"name": "composition-contained-custodian", "comment": "A Composition standing alone whose contained Organization is its custodian and its author: one record, attributed once in each role.", "input": {"file": "fixtures/in/composition-contained-custodian.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/composition-contained-custodian.json", "text": "{\n  \"resourceType\": \"Composition\",\n  \"status\": \"final\",\n  \"contained\": [\n    {\n      \"resourceType\": \"Organization\",\n      \"id\": \"keeper\",\n      \"identifier\": [\n        {\n          \"system\": \"urn:ietf:rfc:3986\",\n          \"value\": \"urn:oid:2.16.840.1.113883.19.5.99999.3\"\n        },\n        {\n          \"system\": \"urn:oid:2.16.840.1.113883.19.5.99999.5\",\n          \"value\": \"RCH-1\"\n        }\n      ],\n      \"name\": \"Riverside Community Hospital\"\n    }\n  ],\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"60591-5\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"display\": \"Ada Okonkwo\"\n  },\n  \"date\": \"2026-09-04\",\n  \"author\": [\n    {\n      \"reference\": \"#keeper\"\n    }\n  ],\n  \"title\": \"Patient summary\",\n  \"custodian\": {\n    \"reference\": \"#keeper\"\n  }\n}\n"}, "expectedGraph": {"file": "fixtures/expected/composition-contained-custodian.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/composition-contained-custodian.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 org: <http://www.w3.org/ns/org#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n@prefix pav: <http://purl.org/pav/> .\n<urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> a cascade:Organization .\n<ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> prov:wasGeneratedBy _:fb22048de15460b8f956e2b908aaeb4d ;\n\tprov:wasAttributedTo <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:fb22048de15460b8f956e2b908aaeb4d prov:qualifiedAssociation _:a050b1e064bdb026a56fd3cac5bbc243 .\n_:a050b1e064bdb026a56fd3cac5bbc243 prov:agent <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> ;\n\tprov:hadRole cascade:AuthorRole .\n<ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> prov:wasGeneratedBy _:efc4d0bcc09b3e5813af7d6e1a8d242a .\n_:efc4d0bcc09b3e5813af7d6e1a8d242a prov:qualifiedAssociation _:bf8815bb797a0809b0350cd7f424eb12 .\n_:bf8815bb797a0809b0350cd7f424eb12 prov:agent <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> ;\n\tprov:hadRole cascade:CustodianRole .\n<ni:///sha-256;ZKCRlsdZDF_dd5vAgYobQgb7Vn2gCC-1NQyFyiGx59M> prov:specializationOf <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:6b2bff5f0c950eafe1a141087e1964b6 bridge:arrivedAs <ni:///sha-256;ZKCRlsdZDF_dd5vAgYobQgb7Vn2gCC-1NQyFyiGx59M> ;\n\toa:hasSelector _:e5b941ec6cfc3278d0ee4842bc840a4e .\n_:e5b941ec6cfc3278d0ee4842bc840a4e a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/contained/0\" .\n<ni:///sha-256;ZKCRlsdZDF_dd5vAgYobQgb7Vn2gCC-1NQyFyiGx59M> foaf:name \"Riverside Community Hospital\" ;\n\torg:identifier \"RCH-1\"^^<urn:oid:2.16.840.1.113883.19.5.99999.5> , \"urn:oid:2.16.840.1.113883.19.5.99999.3\"^^<urn:ietf:rfc:3986> .\n_:6b2bff5f0c950eafe1a141087e1964b6 oa:hasSource <ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> ;\n\tprov:wasGeneratedBy _:d4571d07b6f37bcb5405cc57f4885ec3 .\n<ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> pav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:dc4a2723a15d1aa02beb97f8704e83e7 ;\n\tprov:wasAttributedTo _:b7a6a36536d96cf585770d3814d9b00c ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:5e93cff515f04a18a1f85a0977fcfdd5 prov:agent _:b7a6a36536d96cf585770d3814d9b00c ;\n\tprov:hadRole cascade:AuthorRole .\n_:dc4a2723a15d1aa02beb97f8704e83e7 prov:qualifiedAssociation _:5e93cff515f04a18a1f85a0977fcfdd5 .\n_:cf3d8a9631fdcba41a86dd99ae22b99d prov:agent _:9c587ede5dcd6d143510b93c686738cf ;\n\tprov:hadRole cascade:TransmitterRole .\n_:dc4a2723a15d1aa02beb97f8704e83e7 prov:qualifiedAssociation _:cf3d8a9631fdcba41a86dd99ae22b99d .\n_:b7a6a36536d96cf585770d3814d9b00c <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:9c587ede5dcd6d143510b93c686738cf <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:d4571d07b6f37bcb5405cc57f4885ec3 <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;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> a prov:Entity .\n_:d4571d07b6f37bcb5405cc57f4885ec3 a prov:Activity ;\n\tprov:used <ni:///sha-256;J0KAt2vmrBGmnDugst3fRbHvnxghRxi1SNX1UXDFoAE> ;\n\tprov:qualifiedAssociation _:bb1a4b7445d2f4e808fc17b9c6715cf9 .\n_:bb1a4b7445d2f4e808fc17b9c6715cf9 prov:hadPlan _:42bfdc2a1523e7eb5ba3705465d45fac .\n_:42bfdc2a1523e7eb5ba3705465d45fac a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:bb1a4b7445d2f4e808fc17b9c6715cf9 prov:agent _:5448ffca7b8d1cd133381260022d8e54 .\n_:5448ffca7b8d1cd133381260022d8e54 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/composition-contained-custodian.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/composition-contained-custodian.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_:fdc660e624469ddd6cf8b17146d5773d a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:f8cfcc60dd3e4cc45e929bdf9efbfb03 oa:hasSource <../in/composition-contained-custodian.json> .\n_:fdc660e624469ddd6cf8b17146d5773d oa:refinedBy _:f32f367d53743b5032ac9cc2099b9f48 .\n_:f32f367d53743b5032ac9cc2099b9f48 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resourceType\" .\n_:f8cfcc60dd3e4cc45e929bdf9efbfb03 oa:hasSelector _:fdc660e624469ddd6cf8b17146d5773d .\n_:b115872eb8253430927d04533783e926 oa:hasTarget _:f8cfcc60dd3e4cc45e929bdf9efbfb03 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:resourceTypeNotMapped ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Composition\" .\n", "empty": false}}