{"name": "bundle-pull-searchset-outcome", "comment": "A searchset Bundle holding two matches and an OperationOutcome entry of search.mode outcome. The adapter reads every entry whatever the Bundle's type, so the outcome is a resourceTypeNotMapped finding and no record, and the matches are records.", "input": {"file": "fixtures/in/bundle-pull-searchset-outcome.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/bundle-pull-searchset-outcome.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"searchset\",\n  \"total\": 2,\n  \"entry\": [\n    {\n      \"fullUrl\": \"https://fhir.example.org/r4/Condition/cond-1\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"id\": \"cond-1\",\n        \"meta\": {\n          \"versionId\": \"2\",\n          \"lastUpdated\": \"2024-03-05T14:30:00Z\"\n        },\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n              \"code\": \"active\"\n            }\n          ]\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"44054006\",\n              \"display\": \"Type 2 diabetes mellitus\"\n            }\n          ],\n          \"text\": \"Type 2 diabetes mellitus\"\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"onsetDateTime\": \"2019-08-20\"\n      },\n      \"search\": {\n        \"mode\": \"match\"\n      }\n    },\n    {\n      \"fullUrl\": \"https://fhir.example.org/r4/AllergyIntolerance/alg-1\",\n      \"resource\": {\n        \"resourceType\": \"AllergyIntolerance\",\n        \"id\": \"alg-1\",\n        \"meta\": {\n          \"versionId\": \"1\",\n          \"lastUpdated\": \"2024-01-10T09:05:00Z\"\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n              \"code\": \"7980\",\n              \"display\": \"Penicillin G\"\n            }\n          ],\n          \"text\": \"Penicillin G\"\n        },\n        \"patient\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"criticality\": \"high\"\n      },\n      \"search\": {\n        \"mode\": \"match\"\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\": \"OperationOutcome\",\n        \"issue\": [\n          {\n            \"severity\": \"warning\",\n            \"code\": \"incomplete\",\n            \"diagnostics\": \"The search was limited to the first 2 matches.\"\n          }\n        ]\n      },\n      \"search\": {\n        \"mode\": \"outcome\"\n      }\n    }\n  ]\n}"}, "expectedGraph": {"file": "fixtures/expected/bundle-pull-searchset-outcome.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/bundle-pull-searchset-outcome.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;X3ee1WUUllX0aQXYMB9wkZcXPS9hhuhnmpOxypWAbwo> cascade:conditionName \"Type 2 diabetes mellitus\" ;\n\tcascade:conditionCode <http://snomed.info/id/44054006> ;\n\tcascade:clinicalStatus \"active\" ;\n\tcascade:onsetDate \"2019-08-20\"^^xsd:date .\n<urn:uuid:ccae52d2-3ebb-8c94-a910-fa11501c6474> a cascade:ProblemOrDiagnosis ;\n\tcascade:sourceUrl <https://fhir.example.org/r4/Condition/cond-1> ;\n\tcascade:sourceRecordId \"cond-1\" .\n<ni:///sha-256;X3ee1WUUllX0aQXYMB9wkZcXPS9hhuhnmpOxypWAbwo> prov:specializationOf <urn:uuid:ccae52d2-3ebb-8c94-a910-fa11501c6474> ;\n\tcascade:patient <urn:uuid:dccb6776-d640-88e5-a7b3-7e2e1b860abe> .\n_:42adaf9b321d8e05b3030e709e0bd490 bridge:arrivedAs <ni:///sha-256;X3ee1WUUllX0aQXYMB9wkZcXPS9hhuhnmpOxypWAbwo> ;\n\tpav:version \"2\" ;\n\tpav:lastUpdateOn \"2024-03-05T14:30:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:31c75f890cae0df5e4468a0d6966aa1b ;\n\toa:hasSource <ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> ;\n\tprov:wasDerivedFrom <ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> ;\n\tprov:wasGeneratedBy _:3cc05000c6f5b189cd1639be7f4c4564 .\n_:31c75f890cae0df5e4468a0d6966aa1b a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n<ni:///sha-256;g89pbksj8SKIzfh8my8s6HRgY3Xy2B0GcmQl8l1Sib4> cascade:allergenName \"Penicillin G\" ;\n\tcascade:allergenCode <https://ns.cascadeprotocol.org/codes/rxnorm/7980> ;\n\tcascade:allergyCriticality \"high\" .\n<urn:uuid:561516e5-535f-8aeb-944c-312d661d176e> a cascade:AllergyOrIntolerance ;\n\tcascade:sourceUrl <https://fhir.example.org/r4/AllergyIntolerance/alg-1> ;\n\tcascade:sourceRecordId \"alg-1\" .\n<ni:///sha-256;g89pbksj8SKIzfh8my8s6HRgY3Xy2B0GcmQl8l1Sib4> prov:specializationOf <urn:uuid:561516e5-535f-8aeb-944c-312d661d176e> ;\n\tcascade:patient <urn:uuid:dccb6776-d640-88e5-a7b3-7e2e1b860abe> .\n_:398dff9b2cc76ffa84ea03d10470e008 bridge:arrivedAs <ni:///sha-256;g89pbksj8SKIzfh8my8s6HRgY3Xy2B0GcmQl8l1Sib4> ;\n\tpav:version \"1\" ;\n\tpav:lastUpdateOn \"2024-01-10T09:05:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:62b52fb17919bd2a964685837dbddf05 ;\n\toa:hasSource <ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> ;\n\tprov:wasDerivedFrom <ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> ;\n\tprov:wasGeneratedBy _:3cc05000c6f5b189cd1639be7f4c4564 .\n_:62b52fb17919bd2a964685837dbddf05 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> cascade:serverBaseUrl \"https://fhir.example.org/r4\" ;\n\tpav:retrievedOn \"2026-10-16T09:00:00Z\"^^xsd:dateTime ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:3cc05000c6f5b189cd1639be7f4c4564 <http://www.w3.org/2000/01/rdf-schema#label> \"Example hospital pull\" ;\n\tprov:startedAtTime \"2026-10-16T09:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> a prov:Entity .\n_:3cc05000c6f5b189cd1639be7f4c4564 a prov:Activity ;\n\tprov:used <ni:///sha-256;rTDteROoR4AP4QAkFeU4cNx_EZ9bknCKSq3zerf0amk> ;\n\tprov:qualifiedAssociation _:7d178800113715a37bedd3acab732ea6 .\n_:7d178800113715a37bedd3acab732ea6 prov:hadPlan _:ff0c6af457bb2726cca3ac0dd11594b3 .\n_:ff0c6af457bb2726cca3ac0dd11594b3 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:7d178800113715a37bedd3acab732ea6 prov:agent _:2135fd5c04cde336a7a0fd81e304c81f .\n_:2135fd5c04cde336a7a0fd81e304c81f 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-pull-searchset-outcome.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/bundle-pull-searchset-outcome.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_:a5465ef1a55c298da264b690b2c894b6 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n_:febc59e9b4d64e012830974a27dec5ad oa:hasSource <../in/bundle-pull-searchset-outcome.json> .\n_:a5465ef1a55c298da264b690b2c894b6 oa:refinedBy _:c1c26d61a9dee0646fef6c9045db457a .\n_:c1c26d61a9dee0646fef6c9045db457a a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/resourceType\" .\n_:febc59e9b4d64e012830974a27dec5ad oa:hasSelector _:a5465ef1a55c298da264b690b2c894b6 .\n_:abe653e2c5080a2bf505373d62632bbb oa:hasTarget _:febc59e9b4d64e012830974a27dec5ad ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:resourceTypeNotMapped ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"OperationOutcome\" .\n", "empty": false}}