{"name": "bundle-pull-collection-versions", "comment": "A collection Bundle as a client assembles it from one server's reads: each fullUrl is the server's base, the type and the id, and each resource carries meta.versionId and meta.lastUpdated. Each record is named by the server, type and id, and its version is the pav:version and pav:lastUpdateOn of the version the record arrived as.", "input": {"file": "fixtures/in/bundle-pull-collection-versions.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/bundle-pull-collection-versions.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"https://fhir.example.org/r4/Patient/pat-1\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"id\": \"pat-1\",\n        \"meta\": {\n          \"versionId\": \"1\",\n          \"lastUpdated\": \"2024-01-10T09:00:00Z\"\n        },\n        \"name\": [\n          {\n            \"family\": \"Okafor\",\n            \"given\": [\n              \"Ngozi\"\n            ]\n          }\n        ],\n        \"birthDate\": \"1971-06-02\"\n      }\n    },\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    },\n    {\n      \"fullUrl\": \"https://fhir.example.org/r4/MedicationStatement/medst-1\",\n      \"resource\": {\n        \"resourceType\": \"MedicationStatement\",\n        \"id\": \"medst-1\",\n        \"meta\": {\n          \"versionId\": \"2\",\n          \"lastUpdated\": \"2024-04-15T16:00:00Z\"\n        },\n        \"status\": \"completed\",\n        \"medicationCodeableConcept\": {\n          \"coding\": [\n            {\n              \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n              \"code\": \"861007\",\n              \"display\": \"metformin hydrochloride 500 MG Oral Tablet\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"effectivePeriod\": {\n          \"start\": \"2022-03-01\",\n          \"end\": \"2024-04-15\"\n        }\n      }\n    }\n  ]\n}"}, "expectedGraph": {"file": "fixtures/expected/bundle-pull-collection-versions.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/bundle-pull-collection-versions.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;BBH6TpcNzB_ID0Ht-5Yjsg7xggFunDoYBh1ss5fXrCA> foaf:familyName \"Okafor\" ;\n\tfoaf:givenName \"Ngozi\" ;\n\tcascade:dateOfBirth \"1971-06-02\"^^xsd:date .\n<urn:uuid:dccb6776-d640-88e5-a7b3-7e2e1b860abe> a cascade:PatientProfile ;\n\tcascade:sourceUrl <https://fhir.example.org/r4/Patient/pat-1> ;\n\tcascade:sourceRecordId \"pat-1\" .\n<ni:///sha-256;BBH6TpcNzB_ID0Ht-5Yjsg7xggFunDoYBh1ss5fXrCA> prov:specializationOf <urn:uuid:dccb6776-d640-88e5-a7b3-7e2e1b860abe> .\n_:dadb4dcd069a7b11035391e6a5892eb0 bridge:arrivedAs <ni:///sha-256;BBH6TpcNzB_ID0Ht-5Yjsg7xggFunDoYBh1ss5fXrCA> ;\n\tpav:version \"1\" ;\n\tpav:lastUpdateOn \"2024-01-10T09:00:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:6a0aa5c71645ea1763f8089df9601a74 ;\n\toa:hasSource <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasDerivedFrom <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasGeneratedBy _:6ad5fdf6de578904a7aafb6a53ca311c .\n_:6a0aa5c71645ea1763f8089df9601a74 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\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_:7a31b473f127ed86446dcb6a14e84731 bridge:arrivedAs <ni:///sha-256;X3ee1WUUllX0aQXYMB9wkZcXPS9hhuhnmpOxypWAbwo> ;\n\tpav:version \"2\" ;\n\tpav:lastUpdateOn \"2024-03-05T14:30:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:6d158190746eb915a29ae1ad15e8844b ;\n\toa:hasSource <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasDerivedFrom <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasGeneratedBy _:6ad5fdf6de578904a7aafb6a53ca311c .\n_:6d158190746eb915a29ae1ad15e8844b a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;quGOrVgDRJIH1EAtdgyMlm5M3tw4gJsJfybcixNSBjw> cascade:prescribedOrReported \"reportedUse\" ;\n\tcascade:drugName \"metformin hydrochloride 500 MG Oral Tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/861007> ;\n\tcascade:workflowStatus \"completed\" ;\n\tcascade:medicationUseStartDate \"2022-03-01\"^^xsd:date ;\n\tcascade:medicationUseEndDate \"2024-04-15\"^^xsd:date .\n<urn:uuid:e417d677-68a7-8a18-9ce2-d0903fe593de> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <https://fhir.example.org/r4/MedicationStatement/medst-1> ;\n\tcascade:sourceRecordId \"medst-1\" .\n<ni:///sha-256;quGOrVgDRJIH1EAtdgyMlm5M3tw4gJsJfybcixNSBjw> prov:specializationOf <urn:uuid:e417d677-68a7-8a18-9ce2-d0903fe593de> ;\n\tcascade:patient <urn:uuid:dccb6776-d640-88e5-a7b3-7e2e1b860abe> .\n_:26c59807fa4e4c4335d49d64349f162a bridge:arrivedAs <ni:///sha-256;quGOrVgDRJIH1EAtdgyMlm5M3tw4gJsJfybcixNSBjw> ;\n\tpav:version \"2\" ;\n\tpav:lastUpdateOn \"2024-04-15T16:00:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:43b3c920f84cbdc8a0c3974ec8f8779e ;\n\toa:hasSource <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasDerivedFrom <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:wasGeneratedBy _:6ad5fdf6de578904a7aafb6a53ca311c .\n_:43b3c920f84cbdc8a0c3974ec8f8779e a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n<ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> cascade:serverBaseUrl \"https://fhir.example.org/r4\" ;\n\tpav:retrievedOn \"2026-10-16T09:00:00Z\"^^xsd:dateTime ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:6ad5fdf6de578904a7aafb6a53ca311c <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;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> a prov:Entity .\n_:6ad5fdf6de578904a7aafb6a53ca311c a prov:Activity ;\n\tprov:used <ni:///sha-256;MdbYDOP-iQsIdLtTPApZBb7yF5vNy6d7hEooj_cldKU> ;\n\tprov:qualifiedAssociation _:f3f0a505f99c2f88e52fde7c9229fd4b .\n_:f3f0a505f99c2f88e52fde7c9229fd4b prov:hadPlan _:3ffc9b71259ae5fda4c0d35684754555 .\n_:3ffc9b71259ae5fda4c0d35684754555 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:f3f0a505f99c2f88e52fde7c9229fd4b prov:agent _:369a93a149d017c8dacea47d456fddd6 .\n_:369a93a149d017c8dacea47d456fddd6 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-collection-versions.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/bundle-pull-collection-versions.ttl", "text": "", "empty": true}}