{"name": "medication-request-formulary-code", "comment": "A MedicationRequest coded by its formulary and by RxNorm: the formulary code is a cascade:medicationCodeInOtherSystem literal, and its userSelected flag marks nothing, a selected code being an RxNorm or NDC IRI.", "input": {"file": "fixtures/in/medication-request-formulary-code.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/medication-request-formulary-code.json", "text": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"id\": \"medrx-atorvastatin-2\",\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"https://formulary.meridian.example/drugs\",\n        \"code\": \"F-ATOR-10\",\n        \"display\": \"Atorvastatin 10 mg tab (formulary)\",\n        \"userSelected\": true\n      },\n      {\n        \"system\": \"http://www.nlm.nih.gov/research/umls/rxnorm\",\n        \"code\": \"617312\",\n        \"display\": \"atorvastatin calcium 10 MG Oral Tablet\"\n      }\n    ],\n    \"text\": \"Atorvastatin 10 mg tablet\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-conformance-1\"\n  },\n  \"authoredOn\": \"2026-03-02\"\n}\n"}, "expectedGraph": {"file": "fixtures/expected/medication-request-formulary-code.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/medication-request-formulary-code.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;vjlF_WBctAbnWQAXKasIQhpyXUKNb1hP1CA78IY4iC0> cascade:prescribedOrReported \"prescribed\" ;\n\tcascade:drugName \"Atorvastatin 10 mg tablet\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/617312> ;\n\tcascade:workflowStatus \"active\" ;\n\tcascade:medicationRequestIntent \"order\" ;\n\tcascade:prescriptionWrittenDate \"2026-03-02\"^^xsd:date ;\n\tcascade:medicationCodeInOtherSystem \"F-ATOR-10\"^^<https://formulary.meridian.example/drugs> .\n<urn:uuid:8cc0e8fc-6756-88a0-8967-4fb3170a6294> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/MedicationRequest/medrx-atorvastatin-2> ;\n\tcascade:sourceRecordId \"medrx-atorvastatin-2\" .\n<ni:///sha-256;vjlF_WBctAbnWQAXKasIQhpyXUKNb1hP1CA78IY4iC0> prov:specializationOf <urn:uuid:8cc0e8fc-6756-88a0-8967-4fb3170a6294> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:3bd526c6b51c8d0851edf6e1f1fd78d4 bridge:arrivedAs <ni:///sha-256;vjlF_WBctAbnWQAXKasIQhpyXUKNb1hP1CA78IY4iC0> ;\n\toa:hasSelector _:7e3c5af51b6226897b3e8cbe9c933b46 ;\n\toa:hasSource <ni:///sha-256;5kBu3JlgLKC3kPISe4QMRTrloCucTaT7WbhyWYcBSIs> ;\n\tprov:wasDerivedFrom <ni:///sha-256;5kBu3JlgLKC3kPISe4QMRTrloCucTaT7WbhyWYcBSIs> ;\n\tprov:wasGeneratedBy _:2938de3db7709839fa0875f645112e3c .\n_:7e3c5af51b6226897b3e8cbe9c933b46 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;5kBu3JlgLKC3kPISe4QMRTrloCucTaT7WbhyWYcBSIs> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:7deb4e47062448a23435c68a13d4d4d3 ;\n\tprov:wasAttributedTo _:94e8fddf0b026c2d8c187051fe303b57 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:44fe04fea624899aedf64cacf99bc954 prov:agent _:94e8fddf0b026c2d8c187051fe303b57 ;\n\tprov:hadRole cascade:AuthorRole .\n_:7deb4e47062448a23435c68a13d4d4d3 prov:qualifiedAssociation _:44fe04fea624899aedf64cacf99bc954 .\n_:ca831f4edd9244b5985cb8e6335bad6f prov:agent _:33dcdbda1fef6b67f80ee9818dee6ef4 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:7deb4e47062448a23435c68a13d4d4d3 prov:qualifiedAssociation _:ca831f4edd9244b5985cb8e6335bad6f .\n_:94e8fddf0b026c2d8c187051fe303b57 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:33dcdbda1fef6b67f80ee9818dee6ef4 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:2938de3db7709839fa0875f645112e3c <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;5kBu3JlgLKC3kPISe4QMRTrloCucTaT7WbhyWYcBSIs> a prov:Entity .\n_:2938de3db7709839fa0875f645112e3c a prov:Activity ;\n\tprov:used <ni:///sha-256;5kBu3JlgLKC3kPISe4QMRTrloCucTaT7WbhyWYcBSIs> ;\n\tprov:qualifiedAssociation _:7cffccbcdfb30e8eb7f0146889db6f9d .\n_:7cffccbcdfb30e8eb7f0146889db6f9d prov:hadPlan _:811a9b8ffae12e93b549b272f08a7ffb .\n_:811a9b8ffae12e93b549b272f08a7ffb a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:7cffccbcdfb30e8eb7f0146889db6f9d prov:agent _:3485db1d546b24a7d23da58c90de51d4 .\n_:3485db1d546b24a7d23da58c90de51d4 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/medication-request-formulary-code.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/medication-request-formulary-code.ttl", "text": "", "empty": true}}