diff --git a/api.md b/api.md index 970a0ed..af28c42 100644 --- a/api.md +++ b/api.md @@ -2,7 +2,7 @@ # API reference -Every operation of the haau3 platform API (`1.0.0-preview.45`) is a method on `Haau3` and on +Every operation of the haau3 platform API (`1.0.0-preview.49`) is a method on `Haau3` and on `AsyncHaau3`, named by its operationId in snake_case. Each links to its page on docs.haau3.com, which shows its parameters and an example exchange. Path values come first, then `body` for an operation that takes one, and the query parameters are keyword arguments named by the API's own names in @@ -14,8 +14,8 @@ An operation that declares a header takes it as one more keyword, named from the checked before sending: `process_message` takes `payer_authorization`, sent as `Payer-Authorization`; `sandbox_process_message` takes `payer_authorization`, sent as `Payer-Authorization`. `batch()` sends several of these as one request, each with its own answer or error, from the entries -`haau3.calls` makes. It takes every operation on the FHIR base except `fhir_batch`, `process_message` and `reconcile_medications`: 34 of the -39. See the README's "Several requests in one". +`haau3.calls` makes. It takes every operation on the FHIR base except `fhir_batch`, `process_message` and `reconcile_medications`: 38 of the +43. See the README's "Several requests in one". ## FHIR base @@ -84,7 +84,7 @@ FHIR Questionnaire, served as its source publishes it. This service holds copies ## Medical Benefits -FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Every plan names the CMS release it was read from. Read a plan by its id, or search by identifier, name, state or county, and check whether the CMS National Provider Directory lists providers in a plan's network. +FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Every plan names the CMS release it was read from. Read a plan by its id, or search by identifier, name, state or county, and check whether the CMS National Provider Directory lists providers in a plan's network. A Medicare Part D formulary and a Part D plan's drug plan are InsurancePlans too, read on the same path by their own forms of id, and counted as Pharmacy Benefits. | Method | Request | What it does | |---|---|---| @@ -95,11 +95,15 @@ FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan covers and ## Pharmacy Benefits -The CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR messaging: what a medication would cost a member under their coverage, or its price at pharmacies near a ZIP code, in real time, from the sources this service connects to. A member's request receives patient data, so send it only under an executed agreement. +The CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR messaging: what a medication would cost a member under their coverage, or its price at pharmacies near a ZIP code, in real time, from the sources this service connects to. A member's request receives patient data, so send it only under an executed agreement. And Medicare Part D from CMS's monthly file, in the shape of HL7's Da Vinci US Drug Formulary guide: which drugs each formulary lists, at which tier and with which limits, and each plan's drug plan, with what each tier costs. | Method | Request | What it does | |---|---|---| | [`process_message(body)`](https://docs.haau3.com/api-reference/pharmacy-benefits/check-what-a-medication-costs-pharmacy-benefit-check) | `POST /v1/fhir/r4/$process-message` | Check what a medication costs (pharmacy benefit check) | +| [`search_basic(**query)`](https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-on-a-part-d-formulary) | `GET /v1/fhir/r4/Basic` | Find drugs on a Part D formulary | +| [`read_basic(id)`](https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-on-a-part-d-formulary) | `GET /v1/fhir/r4/Basic/{id}` | Read a drug on a Part D formulary | +| [`search_medication_knowledge(**query)`](https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-any-part-d-formulary-lists) | `GET /v1/fhir/r4/MedicationKnowledge` | Find drugs any Part D formulary lists | +| [`read_medication_knowledge(id)`](https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-a-part-d-formulary-lists) | `GET /v1/fhir/r4/MedicationKnowledge/{id}` | Read a drug a Part D formulary lists | ## MedList diff --git a/openapi/code-samples.json b/openapi/code-samples.json index 3d4a7d1..9326773 100644 --- a/openapi/code-samples.json +++ b/openapi/code-samples.json @@ -2,7 +2,7 @@ "overlay": "1.2.0", "info": { "title": "Python samples for every operation of the haau3 platform API", - "version": "1.0.0-preview.45" + "version": "1.0.0-preview.49" }, "extends": "https://api.haau3.com/openapi.json", "actions": [ @@ -426,6 +426,54 @@ ] } }, + { + "target": "$.paths['/v1/fhir/r4/Basic'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from haau3 import Haau3\n\nclient = Haau3() # reads HAAU3_API_KEY\nbundle = client.search_basic(\n formulary=\"InsurancePlan/Formulary-00027002\",\n subject=\"MedicationKnowledge/FormularyDrug-311354\",\n include=[\"Basic:formulary\", \"Basic:subject\"],\n)\nprint(len(bundle.get(\"entry\", [])))\n" + } + ] + } + }, + { + "target": "$.paths['/v1/fhir/r4/Basic/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from haau3 import Haau3\n\nclient = Haau3() # reads HAAU3_API_KEY\nbasic = client.read_basic(\"FormularyItem-00027002-311354\")\nprint(basic.get(\"id\"))\n" + } + ] + } + }, + { + "target": "$.paths['/v1/fhir/r4/MedicationKnowledge'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from haau3 import Haau3\n\nclient = Haau3() # reads HAAU3_API_KEY\nbundle = client.search_medication_knowledge(code=\"311354\")\nprint(len(bundle.get(\"entry\", [])))\n" + } + ] + } + }, + { + "target": "$.paths['/v1/fhir/r4/MedicationKnowledge/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from haau3 import Haau3\n\nclient = Haau3() # reads HAAU3_API_KEY\nmedication_knowledge = client.read_medication_knowledge(\"FormularyDrug-311354\")\nprint(medication_knowledge.get(\"id\"))\n" + } + ] + } + }, { "target": "$.paths['/v1/fhir/r4/$reconcile-medications'].post", "update": { diff --git a/openapi/etag b/openapi/etag index 21d8214..3b5fcd0 100644 --- a/openapi/etag +++ b/openapi/etag @@ -1 +1 @@ -"83HSBqGwyWwwJnD6q4HBw0zMkgS" +"hmZgQzhF6A5yXJa9YWqeFMkVn4i" diff --git a/openapi/openapi.json b/openapi/openapi.json index 2d9b59e..43f59b4 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "haau3 Platform API", - "version": "1.0.0-preview.45", + "version": "1.0.0-preview.49", "description": "The haau3 platform API is in preview: it may change as we build, usually to add features or improve performance. Endpoints require an API key, sent as `Authorization: Bearer `. Requests without a valid key return 401. Create a key in the dashboard at https://platform.haau3.com; a new organization starts on the free Developer plan. From 2026-11-02 a request past one of its plan's limits (requests a minute on every plan, requests a month on Developer) returns 429 with `Retry-After`. Every service is on the FHIR R4 base at `/v1/fhir/r4`, and every error is a FHIR `OperationOutcome`; https://docs.haau3.com/errors lists every status, whether to retry it, and what a method a path does not take answers." }, "servers": [ @@ -39,11 +39,11 @@ }, { "name": "Medical Benefits", - "description": "FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Every plan names the CMS release it was read from. Read a plan by its id, or search by identifier, name, state or county, and check whether the CMS National Provider Directory lists providers in a plan's network." + "description": "FHIR InsurancePlan: what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Every plan names the CMS release it was read from. Read a plan by its id, or search by identifier, name, state or county, and check whether the CMS National Provider Directory lists providers in a plan's network. A Medicare Part D formulary and a Part D plan's drug plan are InsurancePlans too, read on the same path by their own forms of id, and counted as Pharmacy Benefits." }, { "name": "Pharmacy Benefits", - "description": "The CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR messaging: what a medication would cost a member under their coverage, or its price at pharmacies near a ZIP code, in real time, from the sources this service connects to. A member's request receives patient data, so send it only under an executed agreement." + "description": "The CARIN Consumer Real-Time Pharmacy Benefit Check as FHIR messaging: what a medication would cost a member under their coverage, or its price at pharmacies near a ZIP code, in real time, from the sources this service connects to. A member's request receives patient data, so send it only under an executed agreement. And Medicare Part D from CMS's monthly file, in the shape of HL7's Da Vinci US Drug Formulary guide: which drugs each formulary lists, at which tier and with which limits, and each plan's drug plan, with what each tier costs." }, { "name": "MedList", @@ -121,14 +121,14 @@ "name": "haau3 platform FHIR API" }, "implementation": { - "description": "haau3 platform FHIR R4 API. Five services and three operations are served from this one base: terminology (CodeSystem, ValueSet), the provider directory (Practitioner, PractitionerRole, Organization, OrganizationAffiliation, HealthcareService, Location, Endpoint), questionnaires (Questionnaire), Medical Benefits (InsurancePlan), Scheduling (Slot, Schedule, and a scheduling publisher's Location, Practitioner, PractitionerRole and HealthcareService, read by id), MedList's reconcile-medications, Pharmacy Benefits' process-message and Structured Sig's structure-dosage. Note that `/v1/` versions the haau3 platform API contract, not FHIR; the FHIR release is `r4`, and is echoed on every response as the `fhirVersion` media-type parameter.", + "description": "haau3 platform FHIR R4 API. Five services and three operations are served from this one base: terminology (CodeSystem, ValueSet), the provider directory (Practitioner, PractitionerRole, Organization, OrganizationAffiliation, HealthcareService, Location, Endpoint), questionnaires (Questionnaire), Medical Benefits (InsurancePlan), Scheduling (Slot, Schedule, and a scheduling publisher's Location, Practitioner, PractitionerRole and HealthcareService, read by id), Pharmacy Benefits' Part D formulary (InsurancePlan, Basic, MedicationKnowledge), MedList's reconcile-medications, Pharmacy Benefits' process-message and Structured Sig's structure-dosage. Note that `/v1/` versions the haau3 platform API contract, not FHIR; the FHIR release is `r4`, and is echoed on every response as the `fhirVersion` media-type parameter.", "url": "https://api.haau3.com/v1/fhir/r4" }, "copyright": "This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.\n\nThis product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product.\n\nThis product uses ICD-10-CM, developed by the National Center for Health Statistics (NCHS) of the Centers for Disease Control and Prevention (CDC). ICD-10-CM is available from CDC at no charge at https://www.cdc.gov/nchs/icd/icd-10-cm/index.html. The use of ICD-10-CM here does not imply endorsement by CDC, HHS or the United States Government of haau3 or its products and services. Reference to specific commercial products, manufacturers, companies, or trademarks does not constitute its endorsement or recommendation by the U.S. Government, Department of Health and Human Services, or Centers for Disease Control and Prevention.\n\nCode systems this service holds locally are served from a dated release, named in the version of every answer and in this statement's TerminologyCapabilities. A held release may not reflect the most current data available from its publisher.\n\nFHIR® is the registered trademark of Health Level Seven International and its use here does not constitute endorsement by HL7.\n\nStructured Sig's answers carry SNOMED CT concepts only from the SNOMED CT Global Patient Set (GPS), release 2026-01-01, by SNOMED International, licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License (https://creativecommons.org/licenses/by-nd/4.0/). Each concept's identifier and term are sent unmodified. SNOMED CT is © and ® SNOMED International. SNOMED CT® was originally created by the College of American Pathologists. The GPS is provided as is, without warranty.\n\nThis material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO). All rights reserved. SNOMED CT®, was originally created by The College of American Pathologists. \"SNOMED\" and \"SNOMED CT\" are registered trademarks of the IHTSDO.\n\nThe SNOMED CT concepts were selected using the UMLS Metathesaurus from the U.S. National Library of Medicine, release 2026AA, which holds the US Edition of SNOMED CT of 2026-03-01. NLM does not endorse haau3 or its products.\n\nStructured Sig's answers carry route codes from the NCI Thesaurus™, version 26.10d, produced by the Enterprise Vocabulary Services group of the Center for Biomedical Informatics and Information Technology, National Cancer Institute, Maryland, USA, and released under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). Each code and its term are sent unmodified, and are provided as is, without warranty. The routes Structured Sig uses are a selection of its codes, not the NCI Thesaurus.", "rest": [ { "mode": "server", - "documentation": "All operations accept GET with query parameters and POST with a Parameters resource. Complex inputs — coding, and codeableConcept on the validate-code operations — are accepted on POST only, as the operations framework requires; on GET pass system and code as separate parameters. A codeableConcept validates if ANY of its codings is a member, which fits data whose elements carry a vendor-local coding alongside a standard one; per-coding membership deliberately ignores each coding's display (a wrong label must not veto a right code — display checking is available on the single-coding form). A coding's version is honoured where the operation defines a version parameter (the CodeSystem operations); ValueSet validation always uses the current code-system version and refuses a versioned coding rather than silently ignoring it. A coding whose system disagrees with an explicitly supplied system or url parameter is refused. Value sets and code systems are addressed by canonical url only; instance-level operation paths ([type]/[id]/$operation) are not offered. On $expand, displayLanguage, includeDesignations and activeOnly are refused by name. filter, count and offset narrow a value set this service hosts and the value sets of the code systems it holds (RxNorm and ICD-10-CM), and are refused for a value set resolved from its own source, which is returned whole. On the value sets of a held code system filter is required, the first 20 matches come back when count is not sent, and expansion.total is the exact number of matches; ICD-10-CM codes are written dotted (E11.9), and a header is a code marked notSelectable; how filter matches is in the TerminologyCapabilities (metadata?mode=terminology), expansion.textFilter. A batch Bundle POSTed to the base runs several operations in one round trip; each entry succeeds or fails independently.\n\nProvider directory resources are proxied from the CMS National Provider Directory and served as published, without modification. Pharmacies, which the directory does not serve yet, come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, and are served as NDH 2.0.0 models them: a HealthcareService with category `pharm`, its organization and its store (a pharmacy search on HealthcareService). Search is GET only. Every search parameter is either declared here or refused by name: a parameter this service does not serve is never silently ignored. Where the directory requires a parameter to be sent beside another (`network` on PractitionerRole and HealthcareService), the rule is applied here, before the directory is asked.\n\nA curated set of questionnaires is served from copies vendored at a recorded release of their source, so those forms render the same way on every request. A search that names a canonical URL this service holds no copy of is answered from the source directly, and depends on that source being reachable. A search with no parameters lists the curated set. Search is GET only, and every search parameter is either declared here or refused by name. No operations are served on Questionnaire, and no QuestionnaireResponse is accepted or stored: a completed response is built by the application that collected it and references the questionnaire as `{url}|{version}`.\n\nMedical Benefits (InsurancePlan): what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Each plan conforms to the haau3 Medical Benefits profile (https://haau3.com/fhir/StructureDefinition/haau3-insurance-plan) and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from.\n\nScheduling: open appointment slots from SMART Scheduling Links publishers, each served as its publisher published it, with a new id, the publisher's own id in identifier and its address in meta.source. Search and read Slot and Schedule; a search brings each match's Schedule, Location and provider by _include.\n\nMedList: POST [base]/$reconcile-medications reconciles one patient's medication records into one clean list, returned as a Bundle of reconciled MedicationRequests with a Provenance for each. The operation receives patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged. It is invoked directly and is not offered inside a batch.\n\nPharmacy Benefits: POST [base]/$process-message answers a pharmacy benefit check of the CARIN Consumer Real-Time Pharmacy Benefit Check: what a medication would cost a member under their coverage (event rtpbc-request), or its price at pharmacies near a ZIP code, without patient details (event rtpbc-request-non-phi). A member's request carries patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged. It is invoked directly and is not offered inside a batch.\n\nStructured Sig: POST [base]/$structure-dosage turns one prescription's free-text directions into a FHIR R4 Dosage, returned in a Parameters resource, with a review flag on anything a person should check. It takes the directions and, optionally, the medication's codings, never a patient. Nothing a request carries is stored or logged. It may also be sent inside a batch.", + "documentation": "All operations accept GET with query parameters and POST with a Parameters resource. Complex inputs — coding, and codeableConcept on the validate-code operations — are accepted on POST only, as the operations framework requires; on GET pass system and code as separate parameters. A codeableConcept validates if ANY of its codings is a member, which fits data whose elements carry a vendor-local coding alongside a standard one; per-coding membership deliberately ignores each coding's display (a wrong label must not veto a right code — display checking is available on the single-coding form). A coding's version is honoured where the operation defines a version parameter (the CodeSystem operations); ValueSet validation always uses the current code-system version and refuses a versioned coding rather than silently ignoring it. A coding whose system disagrees with an explicitly supplied system or url parameter is refused. Value sets and code systems are addressed by canonical url only; instance-level operation paths ([type]/[id]/$operation) are not offered. On $expand, displayLanguage, includeDesignations and activeOnly are refused by name. filter, count and offset narrow a value set this service hosts and the value sets of the code systems it holds (RxNorm and ICD-10-CM), and are refused for a value set resolved from its own source, which is returned whole. On the value sets of a held code system filter is required, the first 20 matches come back when count is not sent, and expansion.total is the exact number of matches; ICD-10-CM codes are written dotted (E11.9), and a header is a code marked notSelectable; how filter matches is in the TerminologyCapabilities (metadata?mode=terminology), expansion.textFilter. A batch Bundle POSTed to the base runs several operations in one round trip; each entry succeeds or fails independently.\n\nProvider directory resources are proxied from the CMS National Provider Directory and served as published, without modification. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, and are served as NDH 2.0.0 models them: a HealthcareService with category `pharm`, its organization and its store (a pharmacy search on HealthcareService, or on Organization with `type=pharmacy` for the organizations alone). Search is GET only. Every search parameter is either declared here or refused by name: a parameter this service does not serve is never silently ignored. Where the directory requires a parameter to be sent beside another (`network` on PractitionerRole and HealthcareService), the rule is applied here, before the directory is asked.\n\nA curated set of questionnaires is served from copies vendored at a recorded release of their source, so those forms render the same way on every request. A search that names a canonical URL this service holds no copy of is answered from the source directly, and depends on that source being reachable. A search with no parameters lists the curated set. Search is GET only, and every search parameter is either declared here or refused by name. No operations are served on Questionnaire, and no QuestionnaireResponse is accepted or stored: a completed response is built by the application that collected it and references the questionnaire as `{url}|{version}`.\n\nMedical Benefits (InsurancePlan): what a Medicare Advantage or ACA Marketplace plan covers and what a member pays, read from the files CMS publishes. Each plan conforms to the haau3 Medical Benefits profile (https://haau3.com/fhir/StructureDefinition/haau3-insurance-plan) and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from.\n\nScheduling: open appointment slots from SMART Scheduling Links publishers, each served as its publisher published it, with a new id, the publisher's own id in identifier and its address in meta.source. Search and read Slot and Schedule; a search brings each match's Schedule, Location and provider by _include.\n\nMedList: POST [base]/$reconcile-medications reconciles one patient's medication records into one clean list, returned as a Bundle of reconciled MedicationRequests with a Provenance for each. The operation receives patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged. It is invoked directly and is not offered inside a batch.\n\nPharmacy Benefits: POST [base]/$process-message answers a pharmacy benefit check of the CARIN Consumer Real-Time Pharmacy Benefit Check: what a medication would cost a member under their coverage (event rtpbc-request), or its price at pharmacies near a ZIP code, without patient details (event rtpbc-request-non-phi). A member's request carries patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged. It is invoked directly and is not offered inside a batch.\n\nPharmacy Benefits' Part D formulary (InsurancePlan typed DRUGPOL, Basic, MedicationKnowledge): which drugs each Medicare Part D formulary lists, at which tier and with which limits, read from the monthly file CMS publishes, in the shape of HL7's Da Vinci US Drug Formulary guide, 2.1.0. A formulary and each item name the month of CMS's file they were read from. A formulary lists what a plan covers; it is not a statement of what a member will pay or be given.\n\nStructured Sig: POST [base]/$structure-dosage turns one prescription's free-text directions into a FHIR R4 Dosage, returned in a Parameters resource, with a review flag on anything a person should check. It takes the directions and, optionally, the medication's codings, never a patient. Nothing a request carries is stored or logged. It may also be sent inside a batch.", "interaction": [ { "code": "batch" @@ -355,55 +355,55 @@ "name": "name", "definition": "http://hl7.org/fhir/SearchParameter/Organization-name", "type": "string", - "documentation": "Matches the organization's name." + "documentation": "Matches the organization's name. On a pharmacy search (`type=pharmacy`), two or more letters of the start of the pharmacy's name or a name it does business as." }, { "name": "identifier", "definition": "http://hl7.org/fhir/SearchParameter/Organization-identifier", "type": "token", - "documentation": "An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI." + "documentation": "An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. On a pharmacy search (`type=pharmacy`), the one pharmacy that holds the NPI." }, { "name": "partof", "definition": "http://hl7.org/fhir/SearchParameter/Organization-partof", "type": "reference", - "documentation": "The organizations that are part of one organization. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused." + "documentation": "The organizations that are part of one organization. Refused on a pharmacy search, whose organizations name a parent by its name alone. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused." }, { "name": "type", "definition": "http://hl7.org/fhir/SearchParameter/Organization-type", "type": "token", - "documentation": "An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`)." + "documentation": "An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks, `pharmacy` for pharmacies. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; `type=pharmacy` starts a pharmacy search, which needs a place, a name or an NPI beside it; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`), and their organizations with `type=pharmacy`." }, { "name": "active", "definition": "http://hl7.org/fhir/SearchParameter/Organization-active", "type": "token", - "documentation": "`true` or `false`. Narrows a search; cannot be used on its own." + "documentation": "`true` or `false`. Narrows a search; cannot be used on its own. On a pharmacy search, `true` keeps the pharmacies NPPES lists as active and `false` the ones it lists as deactivated since its November 2026 monthly file; without it, both are returned, each marked by `active`." }, { "name": "address-city", "definition": "http://hl7.org/fhir/SearchParameter/Organization-address-city", "type": "string", - "documentation": "Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city." + "documentation": "Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. On a pharmacy search, two or more letters of the start of the store's city, beside `address-state`." }, { "name": "address-state", "definition": "http://hl7.org/fhir/SearchParameter/Organization-address-state", "type": "string", - "documentation": "Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state." + "documentation": "Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. On a pharmacy search, the two-letter code of the store's state; it stands alone there." }, { "name": "address-postalcode", "definition": "http://hl7.org/fhir/SearchParameter/Organization-address-postalcode", "type": "string", - "documentation": "Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code." + "documentation": "Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. On a pharmacy search, a ZIP code, ZIP+4, or its first two or more digits, matched against the store's address only; it stands alone there." }, { "name": "_id", "definition": "http://hl7.org/fhir/SearchParameter/Resource-id", "type": "token", - "documentation": "A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names." + "documentation": "A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. Refused on a pharmacy search (`type=pharmacy`): read the pharmacy's organization by its id, or find it with `identifier`." }, { "name": "_summary", @@ -417,7 +417,7 @@ "documentation": "Results are paged. `_count` sets the page size (1 to 100); a larger value is refused rather than quietly reduced. Follow `link` with relation `next` to continue. The cursor it carries is opaque and must not be constructed or modified." } ], - "documentation": "Healthcare providers, payers and insurance networks. A search needs a name, an NPI, a parent (`partof`), an id, or `type=ntwk` or `type=pay`; other types, `active` and the address parameters narrow it. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id." + "documentation": "Healthcare providers, payers and insurance networks, and pharmacies' organizations. A search needs a name, an NPI, a parent (`partof`), an id, or `type=ntwk` or `type=pay`; other types, `active` and the address parameters narrow it. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match. `type=pharmacy`, HL7's organization type, bare or as `http://terminology.hl7.org/CodeSystem/organization-type|pharmacy`, finds pharmacies' organizations, from the same records as a pharmacy search on `HealthcareService`: each match is `Organization-pharmacy-{NPI}`, the record a read of that id returns. It needs any one of: `address-postalcode` (a ZIP code or its first two or more digits), `address-state`, `name` or `identifier`; `address-city` narrows a search by state. An address matches the pharmacy's store only, never a mailing or billing address, and a name matches its name or a name it does business as. Without `active`, active and deactivated pharmacies are both returned, each marked. `partof`, `_id`, `_include` and `_revinclude` are refused on it: for a pharmacy's service and store, search `HealthcareService?service-category=pharm` with `_include=HealthcareService:organization` and `_include=HealthcareService:location`. Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id." }, { "type": "OrganizationAffiliation", @@ -510,13 +510,13 @@ "name": "service-category", "definition": "http://hl7.org/fhir/SearchParameter/HealthcareService-service-category", "type": "token", - "documentation": "`pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." + "documentation": "`pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." }, { "name": "specialty", "definition": "http://hl7.org/fhir/SearchParameter/HealthcareService-specialty", "type": "token", - "documentation": "A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." + "documentation": "A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." }, { "name": "location.address-state", @@ -536,6 +536,12 @@ "type": "string", "documentation": "Narrows a pharmacy search to stores in a city whose name starts with this, so `Miami` also finds Miami Beach. Two or more letters. Send it with `location.address-state`." }, + { + "name": "location.near", + "definition": "http://hl7.org/fhir/SearchParameter/Location-near", + "type": "special", + "documentation": "Finds pharmacies near a point, nearest first: FHIR's `near` on the pharmacy's store, as `[latitude]|[longitude]|[distance]|[units]`, in decimal degrees (WGS84), for example `25.7743|-80.1937|5|[mi_us]`. Only pharmacies within that straight-line distance are returned, nearest first. `distance` is at most 50 miles (80.46 km), and without it a point search reaches 50 miles. `units` is `km` (the default) or `[mi_us]` for miles, and each match's distance comes back in the same unit. One point per search. Stands alone on a pharmacy search, and narrows any other." + }, { "name": "name", "definition": "http://hl7.org/fhir/SearchParameter/HealthcareService-name", @@ -578,7 +584,7 @@ "documentation": "Results are paged. `_count` sets the page size (1 to 100); a larger value is refused rather than quietly reduced. Follow `link` with relation `next` to continue. The cursor it carries is opaque and must not be constructed or modified." } ], - "documentation": "Two searches. The directory's services: its service records name a network and, for a few, a location; none names an organization. That search needs a location or an id, and `network` needs a location beside it. And pharmacies, modelled as NDH 2.0.0 models them: a pharmacy service (category `pharm`, its NUCC codes as `specialty`) provided by an organization at a store. A pharmacy search starts with `service-category=pharm` or a NUCC pharmacy `specialty`. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, until CMS's National Provider Directory serves them. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if the search moved to the directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry. A scheduling publisher's HealthcareService is also read here, by its id, `HealthcareService-scheduling-` and 32 hexadecimal characters, and arrives as an included resource in a Slot or Schedule search. It is not found by searching this type." + "documentation": "Two searches. The directory's services: its service records name a network and, for a few, a location; none names an organization. That search needs a location or an id, and `network` needs a location beside it. And pharmacies, modelled as NDH 2.0.0 models them: a pharmacy service (category `pharm`, its NUCC codes as `specialty`) provided by an organization at a store. A pharmacy search starts with `service-category=pharm` or a NUCC pharmacy `specialty`. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. A pharmacy search that sends `location.near`, or a five-digit ZIP code or ZIP+4 in `location.address-postalcode`, comes nearest first: from the point sent, or from the ZIP code area's internal point as the U.S. Census Bureau publishes it. Each match carries its straight-line distance in `search.extension`, HL7's `location-distance` (`http://hl7.org/fhir/StructureDefinition/location-distance`), in the unit `location.near` asked for and otherwise in kilometres, and ties go by NPI. A store's point is in `Location.position`, from the U.S. Census Bureau's geocoder, which places an address along its street's range of numbers. A store it could not place has no `position` and is measured from its own ZIP code area's point instead, its distance marked approximate by haau3's `location-distance-approximate` extension (`https://fhir.haau3.com/platform/StructureDefinition/location-distance-approximate`, `true`); a point search includes it when that point is within its distance. Every store at its own point comes first, then every one measured from its ZIP code area's point, each nearest first, then every one with neither, with no distance, which a point search leaves out. A search by a ZIP code's first digits, or by a ZIP code the Census Bureau gives no area, is not measured: it comes in the order below, and its bundle says so in an `OperationOutcome` entry. Any other pharmacy search comes in one fixed order, the pharmacy's name ignoring case and then its NPI. Every order is the same on every page, the searchset carries `total`, and a continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry. A scheduling publisher's HealthcareService is also read here, by its id, `HealthcareService-scheduling-` and 32 hexadecimal characters, and arrives as an included resource in a Slot or Schedule search. It is not found by searching this type." }, { "type": "Location", @@ -742,7 +748,9 @@ "profile": "https://haau3.com/fhir/StructureDefinition/haau3-insurance-plan", "supportedProfile": [ "https://haau3.com/fhir/StructureDefinition/haau3-insurance-plan", - "http://hl7.org/fhir/us/insurance-card/StructureDefinition/sbc-insurance-plan|2.0.0-ballot" + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/sbc-insurance-plan|2.0.0-ballot", + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-Formulary|2.1.0", + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PayerInsurancePlan|2.1.0" ], "interaction": [ { @@ -781,7 +789,7 @@ "name": "type", "definition": "http://hl7.org/fhir/SearchParameter/InsurancePlan-type", "type": "token", - "documentation": "`mediadv` (Medicare Advantage) or `qhp` (Marketplace), from http://terminology.hl7.org/CodeSystem/insurance-product-type. Narrows a search; it is not one by itself." + "documentation": "`mediadv` (Medicare Advantage) or `qhp` (Marketplace), from http://terminology.hl7.org/CodeSystem/insurance-product-type. Narrows a search; it is not one by itself. DRUGPOL, from http://terminology.hl7.org/CodeSystem/v3-ActCode, finds Medicare Part D formularies instead, and is a search by itself." }, { "name": "sold-to", @@ -794,6 +802,12 @@ "definition": "http://hl7.org/fhir/SearchParameter/Resource-count", "type": "number", "documentation": "Page size, 1 to 50, 10 by default; a larger value is refused rather than quietly reduced. Follow `link` with relation `next` to continue: its cursor is opaque, belongs to the one search, and is refused once the plans are updated, so a search never skips or repeats a plan unseen." + }, + { + "name": "_id", + "definition": "http://hl7.org/fhir/SearchParameter/Resource-id", + "type": "token", + "documentation": "With type=DRUGPOL, a formulary's id, Formulary-00027002. A plan is read by its id instead." } ], "operation": [ @@ -806,7 +820,105 @@ "definition": "https://haau3.com/fhir/OperationDefinition/InsurancePlan-in-network" } ], - "documentation": "Read a plan by its id, or search by identifier, name, state or county. A search needs at least one of these. Every result is the whole plan, sorted by name and then id, and every page states the total. Releases being served. Medicare Advantage: ma-2027-2026-10-01 (plan year 2027); ACA Marketplace: aca-2027-2026-10-30 (plan year 2027)." + "documentation": "Read a plan by its id, or search by identifier, name, state or county. A search needs at least one of these. Every result is the whole plan, sorted by name and then id, and every page states the total. Releases being served. Medicare Advantage: ma-2027-2026-10-01 (plan year 2027); ACA Marketplace: aca-2027-2026-10-30 (plan year 2027). A Medicare Part D formulary is an InsurancePlan too, as Da Vinci's Formulary: read it by its id (Formulary-00027002), or search with type=DRUGPOL, which takes identifier, a form of name, _id and _count (1 to 50, 10 by default). A Medicare Advantage plan with Part D names its formulary on its coverage, with Da Vinci's FormularyReference extension. A Medicare Part D plan's drug coverage is an InsurancePlan of its own, its drug plan, as Da Vinci's PayerInsurancePlan: read it by the plan's id after a prefix (DrugPlan-H2406-013-000). It names the plan's formulary and networks, and gives the plan's deductible and each tier's cost for each way to fill a prescription, in the initial coverage phase, as CMS's monthly Part D file states them for a person with no subsidy. No search finds a drug plan. It lists what a plan charges; it is not a statement of what a member will pay." + }, + { + "type": "Basic", + "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem|2.1.0", + "supportedProfile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem|2.1.0" + ], + "interaction": [ + { + "code": "read" + }, + { + "code": "search-type" + } + ], + "searchParam": [ + { + "name": "formulary", + "definition": "http://hl7.org/fhir/us/davinci-drug-formulary/SearchParameter/Basic-formulary", + "type": "reference", + "documentation": "The formulary an item is on: `InsurancePlan/Formulary-00027002` or `Formulary-00027002`, several separated by commas, up to 20. A formulary that does not exist is refused by name." + }, + { + "name": "subject", + "definition": "http://hl7.org/fhir/us/davinci-drug-formulary/SearchParameter/Basic-subject", + "type": "reference", + "documentation": "The drug: `MedicationKnowledge/FormularyDrug-311354` or `FormularyDrug-311354`, its RxNorm code after `FormularyDrug-`, several separated by commas, up to 20. A search that names a drug and a formulary and finds no item says so in an `OperationOutcome` entry, with the month of CMS's file." + }, + { + "name": "drug-tier", + "definition": "http://hl7.org/fhir/us/davinci-drug-formulary/SearchParameter/Basic-drug-tier", + "type": "token", + "documentation": "The Part D tier, `1` to `6`, bare or as `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier|1`, several separated by commas, up to 20. Narrows a search; it is not one by itself." + }, + { + "name": "pharmacy-benefit-type", + "definition": "http://hl7.org/fhir/us/davinci-drug-formulary/SearchParameter/Basic-pharmacy-benefit-type", + "type": "token", + "documentation": "A way to fill the drug that every plan on the formulary prices: `1-month-in-retail`, `1-month-in-mail`, `3-month-in-retail`, `3-month-in-mail`, bare or with the system of HL7's Da Vinci US Drug Formulary guide, several separated by commas, up to 20. Narrows a search; it is not one by itself." + }, + { + "name": "_id", + "definition": "http://hl7.org/fhir/SearchParameter/Resource-id", + "type": "token", + "documentation": "An item's id, `FormularyItem-00027002-311354`, several separated by commas, up to 20." + }, + { + "name": "_count", + "type": "number", + "documentation": "Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced." + } + ], + "searchInclude": [ + "Basic:formulary", + "Basic:subject" + ], + "documentation": "A drug on a Part D formulary, as Da Vinci's FormularyItem: its tier, prior authorization, step therapy, quantity limit and the ways to fill it that every plan on the formulary prices. A search needs formulary, subject or _id. A search naming a drug and a formulary that finds no item says so in an OperationOutcome entry, with the month of CMS's file." + }, + { + "type": "MedicationKnowledge", + "profile": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug|2.1.0", + "supportedProfile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug|2.1.0" + ], + "interaction": [ + { + "code": "read" + }, + { + "code": "search-type" + } + ], + "searchParam": [ + { + "name": "code", + "definition": "http://hl7.org/fhir/SearchParameter/MedicationKnowledge-code", + "type": "token", + "documentation": "An RxNorm code, bare or as `http://www.nlm.nih.gov/research/umls/rxnorm|311354`, several separated by commas, up to 20. It matches a drug's own code or one of its dose form groups', so a group's code finds every drug in it." + }, + { + "name": "drug-name", + "definition": "http://hl7.org/fhir/us/davinci-drug-formulary/SearchParameter/MedicationKnowledge-drug-name", + "type": "string", + "documentation": "The start of RxNorm's name for the drug or one of its dose form groups, ignoring case: `lisinopril 5`. 1 to 100 characters." + }, + { + "name": "_id", + "definition": "http://hl7.org/fhir/SearchParameter/Resource-id", + "type": "token", + "documentation": "A drug's id, `FormularyDrug-311354`, several separated by commas, up to 20." + }, + { + "name": "_count", + "type": "number", + "documentation": "Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced." + } + ], + "documentation": "A drug some Part D formulary lists, as Da Vinci's FormularyDrug: its RxNorm code and name, then each dose form group RxNorm puts it in. A search needs code, drug-name or _id." }, { "type": "Slot", @@ -7022,7 +7134,7 @@ "Provider directory" ], "summary": "Find organizations, payers and networks", - "description": "Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; any other type, `active` and the address parameters narrow a search but cannot stand alone.\n\nThe directory records networks by the text of their type rather than a code. This service searches that text for `type=ntwk` and confirms every answer is a network; if the directory changes how it records them, the search answers 502 rather than serve something else.\n\nAn NPI search can return a parent organization beside the practice, when the parent lists the NPI among several. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match, up to 100 per page.\n\nA Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id.", + "description": "Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; `type=pharmacy` searches pharmacies' organizations, below; any other type, `active` and the address parameters narrow a search of the directory but cannot stand alone.\n\nThe directory records networks by the text of their type rather than a code. This service searches that text for `type=ntwk` and confirms every answer is a network; if the directory changes how it records them, the search answers 502 rather than serve something else.\n\nAn NPI search can return a parent organization beside the practice, when the parent lists the NPI among several. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match, up to 100 per page.\n\n**Pharmacies' organizations**: `type=pharmacy`, HL7's organization type, bare or as `http://terminology.hl7.org/CodeSystem/organization-type|pharmacy`, finds pharmacies' organizations, from the same records as a pharmacy search on `HealthcareService`: each match is `Organization-pharmacy-{NPI}`, the record a read of that id returns. It needs any one of: `address-postalcode` (a ZIP code or its first two or more digits), `address-state`, `name` or `identifier`; `address-city` narrows a search by state. An address matches the pharmacy's store only, never a mailing or billing address, and a name matches its name or a name it does business as. Without `active`, active and deactivated pharmacies are both returned, each marked. `partof`, `_id`, `_include` and `_revinclude` are refused on it: for a pharmacy's service and store, search `HealthcareService?service-category=pharm` with `_include=HealthcareService:organization` and `_include=HealthcareService:location`.\n\nResults come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them.\n\nA Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id.", "operationId": "searchOrganization", "parameters": [ { @@ -7034,7 +7146,7 @@ "minLength": 1, "maxLength": 100 }, - "description": "Matches the organization's name." + "description": "Matches the organization's name. On a pharmacy search (`type=pharmacy`), two or more letters of the start of the pharmacy's name or a name it does business as." }, { "name": "identifier", @@ -7045,7 +7157,7 @@ "minLength": 1, "maxLength": 256 }, - "description": "An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI." + "description": "An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. On a pharmacy search (`type=pharmacy`), the one pharmacy that holds the NPI." }, { "name": "partof", @@ -7056,7 +7168,7 @@ "minLength": 1, "maxLength": 256 }, - "description": "The organizations that are part of one organization. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused." + "description": "The organizations that are part of one organization. Refused on a pharmacy search, whose organizations name a parent by its name alone. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused." }, { "name": "type", @@ -7067,7 +7179,7 @@ "minLength": 1, "maxLength": 256 }, - "description": "An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`).", + "description": "An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks, `pharmacy` for pharmacies. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; `type=pharmacy` starts a pharmacy search, which needs a place, a name or an NPI beside it; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`), and their organizations with `type=pharmacy`.", "example": "ntwk" }, { @@ -7081,7 +7193,7 @@ "false" ] }, - "description": "`true` or `false`. Narrows a search; cannot be used on its own." + "description": "`true` or `false`. Narrows a search; cannot be used on its own. On a pharmacy search, `true` keeps the pharmacies NPPES lists as active and `false` the ones it lists as deactivated since its November 2026 monthly file; without it, both are returned, each marked by `active`." }, { "name": "address-city", @@ -7092,7 +7204,7 @@ "minLength": 1, "maxLength": 100 }, - "description": "Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city." + "description": "Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. On a pharmacy search, two or more letters of the start of the store's city, beside `address-state`." }, { "name": "address-state", @@ -7103,7 +7215,7 @@ "minLength": 1, "maxLength": 50 }, - "description": "Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state." + "description": "Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. On a pharmacy search, the two-letter code of the store's state; it stands alone there." }, { "name": "address-postalcode", @@ -7114,7 +7226,7 @@ "minLength": 1, "maxLength": 100 }, - "description": "Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code." + "description": "Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. On a pharmacy search, a ZIP code, ZIP+4, or its first two or more digits, matched against the store's address only; it stands alone there." }, { "name": "_include", @@ -7133,7 +7245,7 @@ }, "style": "form", "explode": true, - "description": "`Organization:partof` brings the organization each match is part of. Repeat the parameter to include several. Included entries do not count toward `_count`." + "description": "`Organization:partof` brings the organization each match is part of. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`." }, { "name": "_revinclude", @@ -7157,7 +7269,7 @@ }, "style": "form", "explode": true, - "description": "Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short." + "description": "Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short." }, { "name": "_id", @@ -7167,7 +7279,7 @@ "type": "string", "pattern": "^[A-Za-z0-9\\-.]{1,64}$" }, - "description": "A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names." + "description": "A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. Refused on a pharmacy search (`type=pharmacy`): read the pharmacy's organization by its id, or find it with `identifier`." }, { "name": "_summary", @@ -7210,7 +7322,7 @@ ], "responses": { "200": { - "description": "A FHIR `Bundle` with `type: searchset`. `total` is present when the directory sends one.", + "description": "A FHIR `Bundle` with `type: searchset`. `total` is present when the directory sends one, and on every pharmacy search, where `_summary=count` answers it alone.", "content": { "application/fhir+json": { "schema": { @@ -7445,7 +7557,7 @@ "Provider directory" ], "summary": "Read an Organization", - "description": "Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search on `HealthcareService`) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id.", + "description": "Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id.", "operationId": "readOrganization", "parameters": [ { @@ -8165,7 +8277,7 @@ "Provider directory" ], "summary": "Find healthcare services and pharmacies", - "description": "Search `HealthcareService` two ways.\n\n**The directory's services**, by location, or by network beside a location. The directory's service records name a network and, for a few, a location; none names an organization, so `organization` is refused on this search rather than answered with nothing.\n\n**Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle.\n\nResults come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, until CMS's National Provider Directory serves them. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if the search moved to the directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy.\n\n**A Medicare Part D plan's pharmacies**: add `network` to a pharmacy search. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry.", + "description": "Search `HealthcareService` two ways.\n\n**The directory's services**, by location, or by network beside a location. The directory's service records name a network and, for a few, a location; none names an organization, so `organization` is refused on this search rather than answered with nothing.\n\n**Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle.\n\nA pharmacy search that sends `location.near`, or a five-digit ZIP code or ZIP+4 in `location.address-postalcode`, comes nearest first: from the point sent, or from the ZIP code area's internal point as the U.S. Census Bureau publishes it. Each match carries its straight-line distance in `search.extension`, HL7's `location-distance` (`http://hl7.org/fhir/StructureDefinition/location-distance`), in the unit `location.near` asked for and otherwise in kilometres, and ties go by NPI. A store's point is in `Location.position`, from the U.S. Census Bureau's geocoder, which places an address along its street's range of numbers. A store it could not place has no `position` and is measured from its own ZIP code area's point instead, its distance marked approximate by haau3's `location-distance-approximate` extension (`https://fhir.haau3.com/platform/StructureDefinition/location-distance-approximate`, `true`); a point search includes it when that point is within its distance. Every store at its own point comes first, then every one measured from its ZIP code area's point, each nearest first, then every one with neither, with no distance, which a point search leaves out. A search by a ZIP code's first digits, or by a ZIP code the Census Bureau gives no area, is not measured: it comes in the order below, and its bundle says so in an `OperationOutcome` entry. Any other pharmacy search comes in one fixed order, the pharmacy's name ignoring case and then its NPI. Every order is the same on every page, the searchset carries `total`, and a continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy.\n\n**A Medicare Part D plan's pharmacies**: add `network` to a pharmacy search. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry.", "operationId": "searchHealthcareService", "parameters": [ { @@ -8199,7 +8311,7 @@ "minLength": 1, "maxLength": 256 }, - "description": "`pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name.", + "description": "`pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name.", "example": "pharm" }, { @@ -8211,7 +8323,7 @@ "minLength": 1, "maxLength": 256 }, - "description": "A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." + "description": "A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name." }, { "name": "location.address-state", @@ -8248,6 +8360,17 @@ }, "description": "Narrows a pharmacy search to stores in a city whose name starts with this, so `Miami` also finds Miami Beach. Two or more letters. Send it with `location.address-state`." }, + { + "name": "location.near", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "description": "Finds pharmacies near a point, nearest first: FHIR's `near` on the pharmacy's store, as `[latitude]|[longitude]|[distance]|[units]`, in decimal degrees (WGS84), for example `25.7743|-80.1937|5|[mi_us]`. Only pharmacies within that straight-line distance are returned, nearest first. `distance` is at most 50 miles (80.46 km), and without it a point search reaches 50 miles. `units` is `km` (the default) or `[mi_us]` for miles, and each match's distance comes back in the same unit. One point per search. Stands alone on a pharmacy search, and narrows any other." + }, { "name": "name", "in": "query", @@ -8390,12 +8513,12 @@ ], "entry": [ { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1376440388", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1275433062", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1376440388", + "id": "HealthcareService-pharmacy-1275433062", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -8424,8 +8547,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1376440388", - "display": "CARE 4 SOLUTIONS LLC" + "reference": "Organization/Organization-pharmacy-1275433062", + "display": "PHARMA ONE SOFT LLC" }, "category": [ { @@ -8451,10 +8574,10 @@ ], "location": [ { - "reference": "Location/Location-pharmacy-1376440388" + "reference": "Location/Location-pharmacy-1275433062" } ], - "name": "CARE 4 SOLUTIONS LLC", + "name": "PHARMA ONE SOFT LLC", "telecom": [ { "system": "phone", @@ -8464,16 +8587,27 @@ ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 0.7, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1164506655", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1437059235", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1164506655", + "id": "HealthcareService-pharmacy-1437059235", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -8487,7 +8621,7 @@ "extension": [ { "url": "listed", - "valueBoolean": true + "valueBoolean": false }, { "url": "asOf", @@ -8502,8 +8636,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1164506655", - "display": "CVS Pharmacy # 00402" + "reference": "Organization/Organization-pharmacy-1437059235", + "display": "PHARMA AVANTI LLC" }, "category": [ { @@ -8521,27 +8655,38 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" + "code": "3336C0003X", + "display": "Community/Retail Pharmacy" } ] } ], "location": [ { - "reference": "Location/Location-pharmacy-1164506655" + "reference": "Location/Location-pharmacy-1437059235" } ], - "name": "CVS Pharmacy # 00402", + "name": "PHARMA AVANTI LLC", "telecom": [ { "system": "phone", - "value": "305-374-1140", + "value": "870-888-0627", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 0.76, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, @@ -8629,14 +8774,25 @@ ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 0.82, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1992085880", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1164506655", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1992085880", + "id": "HealthcareService-pharmacy-1164506655", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -8652,7 +8808,7 @@ "extension": [ { "url": "listed", - "valueBoolean": false + "valueBoolean": true }, { "url": "asOf", @@ -8667,8 +8823,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1992085880", - "display": "LAMONT GROUP INC" + "reference": "Organization/Organization-pharmacy-1164506655", + "display": "CVS Pharmacy # 00402" }, "category": [ { @@ -8686,35 +8842,46 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "3336C0003X", - "display": "Community/Retail Pharmacy" + "code": "333600000X", + "display": "Pharmacy" } ] } ], "location": [ { - "reference": "Location/Location-pharmacy-1992085880" + "reference": "Location/Location-pharmacy-1164506655" } ], - "name": "LAMONT GROUP INC", + "name": "CVS Pharmacy # 00402", "telecom": [ { "system": "phone", - "value": "305-728-9958", + "value": "305-374-1140", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 0.94, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1700860020", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1376440388", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1700860020", + "id": "HealthcareService-pharmacy-1376440388", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -8745,8 +8912,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1700860020", - "display": "MIAMI DOWNTOWN PHARMACY, INC" + "reference": "Organization/Organization-pharmacy-1376440388", + "display": "CARE 4 SOLUTIONS LLC" }, "category": [ { @@ -8764,35 +8931,46 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" + "code": "3336C0003X", + "display": "Community/Retail Pharmacy" } ] } ], "location": [ { - "reference": "Location/Location-pharmacy-1700860020" + "reference": "Location/Location-pharmacy-1376440388" } ], - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "CARE 4 SOLUTIONS LLC", "telecom": [ { "system": "phone", - "value": "305-374-5076", + "value": "870-888-0627", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 0.95, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1821480708", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1962417212", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1821480708", + "id": "HealthcareService-pharmacy-1962417212", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -8808,7 +8986,7 @@ "extension": [ { "url": "listed", - "valueBoolean": false + "valueBoolean": true }, { "url": "asOf", @@ -8823,8 +9001,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1821480708", - "display": "MIAMI DOWNTOWN PHARMACY, INC" + "reference": "Organization/Organization-pharmacy-1962417212", + "display": "WALGREENS #03239" }, "category": [ { @@ -8838,6 +9016,15 @@ } ], "specialty": [ + { + "coding": [ + { + "system": "http://nucc.org/provider-taxonomy", + "code": "333600000X", + "display": "Pharmacy" + } + ] + }, { "coding": [ { @@ -8850,29 +9037,40 @@ ], "location": [ { - "reference": "Location/Location-pharmacy-1821480708" + "reference": "Location/Location-pharmacy-1962417212" } ], - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "WALGREENS #03239", "telecom": [ { "system": "phone", - "value": "305-374-5075", + "value": "305-373-4320", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 1.07, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1437059235", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1992085880", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1437059235", + "id": "HealthcareService-pharmacy-1992085880", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -8901,8 +9099,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1437059235", - "display": "PHARMA AVANTI LLC" + "reference": "Organization/Organization-pharmacy-1992085880", + "display": "LAMONT GROUP INC" }, "category": [ { @@ -8928,29 +9126,40 @@ ], "location": [ { - "reference": "Location/Location-pharmacy-1437059235" + "reference": "Location/Location-pharmacy-1992085880" } ], - "name": "PHARMA AVANTI LLC", + "name": "LAMONT GROUP INC", "telecom": [ { "system": "phone", - "value": "870-888-0627", + "value": "305-728-9958", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 1.11, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1275433062", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1700860020", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1275433062", + "id": "HealthcareService-pharmacy-1700860020", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -8979,9 +9188,9 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1275433062", - "display": "PHARMA ONE SOFT LLC" - }, + "reference": "Organization/Organization-pharmacy-1700860020", + "display": "MIAMI DOWNTOWN PHARMACY, INC" + }, "category": [ { "coding": [ @@ -8998,35 +9207,46 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "3336C0003X", - "display": "Community/Retail Pharmacy" + "code": "333600000X", + "display": "Pharmacy" } ] } ], "location": [ { - "reference": "Location/Location-pharmacy-1275433062" + "reference": "Location/Location-pharmacy-1700860020" } ], - "name": "PHARMA ONE SOFT LLC", + "name": "MIAMI DOWNTOWN PHARMACY, INC", "telecom": [ { "system": "phone", - "value": "870-888-0627", + "value": "305-374-5076", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 1.16, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1962417212", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/HealthcareService/HealthcareService-pharmacy-1821480708", "resource": { "resourceType": "HealthcareService", - "id": "HealthcareService-pharmacy-1962417212", + "id": "HealthcareService-pharmacy-1821480708", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -9042,7 +9262,7 @@ "extension": [ { "url": "listed", - "valueBoolean": true + "valueBoolean": false }, { "url": "asOf", @@ -9057,8 +9277,8 @@ ], "active": true, "providedBy": { - "reference": "Organization/Organization-pharmacy-1962417212", - "display": "WALGREENS #03239" + "reference": "Organization/Organization-pharmacy-1821480708", + "display": "MIAMI DOWNTOWN PHARMACY, INC" }, "category": [ { @@ -9072,15 +9292,6 @@ } ], "specialty": [ - { - "coding": [ - { - "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" - } - ] - }, { "coding": [ { @@ -9093,19 +9304,30 @@ ], "location": [ { - "reference": "Location/Location-pharmacy-1962417212" + "reference": "Location/Location-pharmacy-1821480708" } ], - "name": "WALGREENS #03239", + "name": "MIAMI DOWNTOWN PHARMACY, INC", "telecom": [ { "system": "phone", - "value": "305-373-4320", + "value": "305-374-5075", "use": "work" } ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 1.16, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, @@ -9193,16 +9415,27 @@ ] }, "search": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/location-distance", + "valueDistance": { + "value": 1.33, + "unit": "km", + "system": "http://unitsofmeasure.org", + "code": "km" + } + } + ], "mode": "match" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1376440388", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1275433062", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1376440388", + "id": "Organization-pharmacy-1275433062", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -9216,11 +9449,11 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2026-10-22" + "valueDate": "2026-11-06" }, { "url": "certified", - "valueDate": "2026-10-22" + "valueDate": "2026-11-06" } ] } @@ -9228,9 +9461,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1376440388", + "value": "1275433062", "period": { - "start": "2026-10-22" + "start": "2026-11-06" } } ], @@ -9257,7 +9490,7 @@ "text": "Pharmacy" } ], - "name": "CARE 4 SOLUTIONS LLC", + "name": "PHARMA ONE SOFT LLC", "telecom": [ { "system": "phone", @@ -9275,11 +9508,11 @@ "use": "work", "type": "physical", "line": [ - "2 S BISCAYNE BLVD" + "300 S BISCAYNE BLVD APT 3304" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1806", + "postalCode": "33131-5356", "country": "US" } ] @@ -9289,12 +9522,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1376440388", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1275433062", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1376440388", + "id": "Location-pharmacy-1275433062", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -9303,7 +9536,7 @@ ] }, "status": "active", - "name": "CARE 4 SOLUTIONS LLC", + "name": "PHARMA ONE SOFT LLC", "type": [ { "coding": [ @@ -9340,16 +9573,20 @@ "use": "work", "type": "physical", "line": [ - "2 S BISCAYNE BLVD" + "300 S BISCAYNE BLVD APT 3304" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1806", + "postalCode": "33131-5356", "country": "US" }, + "position": { + "longitude": -80.187307, + "latitude": 25.771181 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1376440388", - "display": "CARE 4 SOLUTIONS LLC" + "reference": "Organization/Organization-pharmacy-1275433062", + "display": "PHARMA ONE SOFT LLC" } }, "search": { @@ -9357,12 +9594,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1164506655", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1437059235", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1164506655", + "id": "Organization-pharmacy-1437059235", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -9376,43 +9613,11 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2012-11-16" - } - ] - }, - { - "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Organization.qualification", - "extension": [ - { - "url": "identifier", - "valueIdentifier": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/identifier-jurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "FL" - } - ] - } - } - ], - "value": "PH22314" - } + "valueDate": "2026-11-06" }, { - "url": "code", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" - } - ] - } + "url": "certified", + "valueDate": "2026-11-06" } ] } @@ -9420,9 +9625,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1164506655", + "value": "1437059235", "period": { - "start": "2006-10-24" + "start": "2026-11-06" } } ], @@ -9449,14 +9654,16 @@ "text": "Pharmacy" } ], - "name": "CVS Pharmacy # 00402", - "alias": [ - "HOLIDAY CVS, L.L.C." - ], + "name": "PHARMA AVANTI LLC", "telecom": [ { "system": "phone", - "value": "305-374-1140", + "value": "870-888-0627", + "use": "work" + }, + { + "system": "fax", + "value": "870-888-0627", "use": "work" } ], @@ -9465,11 +9672,11 @@ "use": "work", "type": "physical", "line": [ - "170 SE 3RD AVE" + "201 S BISCAYNE BLVD STE 1200" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-2004", + "postalCode": "33131-4316", "country": "US" } ] @@ -9479,12 +9686,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1164506655", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1437059235", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1164506655", + "id": "Location-pharmacy-1437059235", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -9493,7 +9700,7 @@ ] }, "status": "active", - "name": "CVS Pharmacy # 00402", + "name": "PHARMA AVANTI LLC", "type": [ { "coding": [ @@ -9503,12 +9710,26 @@ "display": "Pharmacy" } ] + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "code": "OUTPHARM", + "display": "outpatient pharmacy" + } + ] } ], "telecom": [ { "system": "phone", - "value": "305-374-1140", + "value": "870-888-0627", + "use": "work" + }, + { + "system": "fax", + "value": "870-888-0627", "use": "work" } ], @@ -9516,16 +9737,20 @@ "use": "work", "type": "physical", "line": [ - "170 SE 3RD AVE" + "201 S BISCAYNE BLVD STE 1200" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-2004", + "postalCode": "33131-4316", "country": "US" }, + "position": { + "longitude": -80.187188, + "latitude": 25.771811 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1164506655", - "display": "CVS Pharmacy # 00402" + "reference": "Organization/Organization-pharmacy-1437059235", + "display": "PHARMA AVANTI LLC" } }, "search": { @@ -9676,6 +9901,10 @@ "postalCode": "33131-3207", "country": "US" }, + "position": { + "longitude": -80.191684, + "latitude": 25.762194 + }, "managingOrganization": { "reference": "Organization/Organization-pharmacy-1780099325", "display": "CVS Pharmacy #10132" @@ -9686,10 +9915,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1992085880", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1164506655", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1992085880", + "id": "Organization-pharmacy-1164506655", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -9705,7 +9934,43 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2011-08-23" + "valueDate": "2012-11-16" + } + ] + }, + { + "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Organization.qualification", + "extension": [ + { + "url": "identifier", + "valueIdentifier": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/identifier-jurisdiction", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://www.usps.com/", + "code": "FL" + } + ] + } + } + ], + "value": "PH22314" + } + }, + { + "url": "code", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://nucc.org/provider-taxonomy", + "code": "333600000X", + "display": "Pharmacy" + } + ] + } } ] } @@ -9713,9 +9978,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1992085880", + "value": "1164506655", "period": { - "start": "2011-08-23" + "start": "2006-10-24" } } ], @@ -9742,11 +10007,14 @@ "text": "Pharmacy" } ], - "name": "LAMONT GROUP INC", + "name": "CVS Pharmacy # 00402", + "alias": [ + "HOLIDAY CVS, L.L.C." + ], "telecom": [ { "system": "phone", - "value": "305-728-9958", + "value": "305-374-1140", "use": "work" } ], @@ -9755,12 +10023,11 @@ "use": "work", "type": "physical", "line": [ - "223 E FLAGLER ST", - "410" + "170 SE 3RD AVE" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1327", + "postalCode": "33131-2004", "country": "US" } ] @@ -9770,10 +10037,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1992085880", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1164506655", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1992085880", + "id": "Location-pharmacy-1164506655", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -9784,7 +10051,7 @@ ] }, "status": "active", - "name": "LAMONT GROUP INC", + "name": "CVS Pharmacy # 00402", "type": [ { "coding": [ @@ -9794,21 +10061,12 @@ "display": "Pharmacy" } ] - }, - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", - "code": "OUTPHARM", - "display": "outpatient pharmacy" - } - ] } ], "telecom": [ { "system": "phone", - "value": "305-728-9958", + "value": "305-374-1140", "use": "work" } ], @@ -9816,17 +10074,20 @@ "use": "work", "type": "physical", "line": [ - "223 E FLAGLER ST", - "410" + "170 SE 3RD AVE" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1327", + "postalCode": "33131-2004", "country": "US" }, + "position": { + "longitude": -80.189003, + "latitude": 25.772879 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1992085880", - "display": "LAMONT GROUP INC" + "reference": "Organization/Organization-pharmacy-1164506655", + "display": "CVS Pharmacy # 00402" } }, "search": { @@ -9834,10 +10095,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1700860020", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1376440388", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1700860020", + "id": "Organization-pharmacy-1376440388", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -9853,43 +10114,11 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2020-08-22" - } - ] - }, - { - "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Organization.qualification", - "extension": [ - { - "url": "identifier", - "valueIdentifier": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/identifier-jurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "FL" - } - ] - } - } - ], - "value": "PH21090" - } + "valueDate": "2026-10-22" }, { - "url": "code", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" - } - ] - } + "url": "certified", + "valueDate": "2026-10-22" } ] } @@ -9897,9 +10126,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1700860020", + "value": "1376440388", "period": { - "start": "2005-11-30" + "start": "2026-10-22" } } ], @@ -9926,16 +10155,16 @@ "text": "Pharmacy" } ], - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "CARE 4 SOLUTIONS LLC", "telecom": [ { "system": "phone", - "value": "305-374-5076", + "value": "870-888-0627", "use": "work" }, { "system": "fax", - "value": "305-371-9524", + "value": "870-888-0627", "use": "work" } ], @@ -9944,11 +10173,11 @@ "use": "work", "type": "physical", "line": [ - "96 SE 1ST ST" + "2 S BISCAYNE BLVD" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1008", + "postalCode": "33131-1806", "country": "US" } ] @@ -9958,10 +10187,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1700860020", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1376440388", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1700860020", + "id": "Location-pharmacy-1376440388", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -9972,7 +10201,7 @@ ] }, "status": "active", - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "CARE 4 SOLUTIONS LLC", "type": [ { "coding": [ @@ -9982,17 +10211,26 @@ "display": "Pharmacy" } ] + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "code": "OUTPHARM", + "display": "outpatient pharmacy" + } + ] } ], "telecom": [ { "system": "phone", - "value": "305-374-5076", + "value": "870-888-0627", "use": "work" }, { "system": "fax", - "value": "305-371-9524", + "value": "870-888-0627", "use": "work" } ], @@ -10000,16 +10238,20 @@ "use": "work", "type": "physical", "line": [ - "96 SE 1ST ST" + "2 S BISCAYNE BLVD" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1008", + "postalCode": "33131-1806", "country": "US" }, + "position": { + "longitude": -80.187574, + "latitude": 25.773575 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1700860020", - "display": "MIAMI DOWNTOWN PHARMACY, INC" + "reference": "Organization/Organization-pharmacy-1376440388", + "display": "CARE 4 SOLUTIONS LLC" } }, "search": { @@ -10017,10 +10259,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1821480708", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1962417212", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1821480708", + "id": "Organization-pharmacy-1962417212", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -10036,7 +10278,11 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2015-03-02" + "valueDate": "2023-10-31" + }, + { + "url": "certified", + "valueDate": "2023-10-31" } ] }, @@ -10059,7 +10305,7 @@ } } ], - "value": "PH21090" + "value": "0000913" } }, { @@ -10068,8 +10314,8 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "3336C0003X", - "display": "Community/Retail Pharmacy" + "code": "333600000X", + "display": "Pharmacy" } ] } @@ -10080,9 +10326,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1821480708", + "value": "1962417212", "period": { - "start": "2015-03-02" + "start": "2006-07-29" } } ], @@ -10109,16 +10355,14 @@ "text": "Pharmacy" } ], - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "WALGREENS #03239", + "alias": [ + "WALGREEN CO" + ], "telecom": [ { "system": "phone", - "value": "305-374-5075", - "use": "work" - }, - { - "system": "fax", - "value": "305-374-5092", + "value": "305-373-4320", "use": "work" } ], @@ -10127,24 +10371,27 @@ "use": "work", "type": "physical", "line": [ - "96 SE 1ST ST" + "1 SE 3RD AVE" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1008", + "postalCode": "33131-1700", "country": "US" } - ] + ], + "partOf": { + "display": "WALGREENS BOOTS ALLIANCE INC" + } }, "search": { "mode": "include" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1821480708", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1962417212", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1821480708", + "id": "Location-pharmacy-1962417212", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -10155,7 +10402,7 @@ ] }, "status": "active", - "name": "MIAMI DOWNTOWN PHARMACY, INC", + "name": "WALGREENS #03239", "type": [ { "coding": [ @@ -10179,12 +10426,7 @@ "telecom": [ { "system": "phone", - "value": "305-374-5075", - "use": "work" - }, - { - "system": "fax", - "value": "305-374-5092", + "value": "305-373-4320", "use": "work" } ], @@ -10192,16 +10434,20 @@ "use": "work", "type": "physical", "line": [ - "96 SE 1ST ST" + "1 SE 3RD AVE" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1008", + "postalCode": "33131-1700", "country": "US" }, + "position": { + "longitude": -80.188915, + "latitude": 25.774204 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1821480708", - "display": "MIAMI DOWNTOWN PHARMACY, INC" + "reference": "Organization/Organization-pharmacy-1962417212", + "display": "WALGREENS #03239" } }, "search": { @@ -10209,12 +10455,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1437059235", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1992085880", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1437059235", + "id": "Organization-pharmacy-1992085880", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -10228,11 +10474,7 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2026-11-06" - }, - { - "url": "certified", - "valueDate": "2026-11-06" + "valueDate": "2011-08-23" } ] } @@ -10240,9 +10482,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1437059235", + "value": "1992085880", "period": { - "start": "2026-11-06" + "start": "2011-08-23" } } ], @@ -10269,16 +10511,11 @@ "text": "Pharmacy" } ], - "name": "PHARMA AVANTI LLC", + "name": "LAMONT GROUP INC", "telecom": [ { "system": "phone", - "value": "870-888-0627", - "use": "work" - }, - { - "system": "fax", - "value": "870-888-0627", + "value": "305-728-9958", "use": "work" } ], @@ -10287,11 +10524,12 @@ "use": "work", "type": "physical", "line": [ - "201 S BISCAYNE BLVD STE 1200" + "223 E FLAGLER ST", + "410" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-4316", + "postalCode": "33131-1327", "country": "US" } ] @@ -10301,12 +10539,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1437059235", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1992085880", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1437059235", + "id": "Location-pharmacy-1992085880", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -10315,7 +10553,7 @@ ] }, "status": "active", - "name": "PHARMA AVANTI LLC", + "name": "LAMONT GROUP INC", "type": [ { "coding": [ @@ -10339,12 +10577,7 @@ "telecom": [ { "system": "phone", - "value": "870-888-0627", - "use": "work" - }, - { - "system": "fax", - "value": "870-888-0627", + "value": "305-728-9958", "use": "work" } ], @@ -10352,16 +10585,21 @@ "use": "work", "type": "physical", "line": [ - "201 S BISCAYNE BLVD STE 1200" + "223 E FLAGLER ST", + "410" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-4316", + "postalCode": "33131-1327", "country": "US" }, + "position": { + "longitude": -80.189676, + "latitude": 25.774309 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1437059235", - "display": "PHARMA AVANTI LLC" + "reference": "Organization/Organization-pharmacy-1992085880", + "display": "LAMONT GROUP INC" } }, "search": { @@ -10369,12 +10607,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1275433062", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1700860020", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1275433062", + "id": "Organization-pharmacy-1700860020", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -10388,28 +10626,60 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2026-11-06" - }, - { - "url": "certified", - "valueDate": "2026-11-06" + "valueDate": "2020-08-22" } ] - } - ], - "identifier": [ - { - "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1275433062", - "period": { - "start": "2026-11-06" - } - } - ], - "active": true, - "type": [ + }, { - "coding": [ + "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Organization.qualification", + "extension": [ + { + "url": "identifier", + "valueIdentifier": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/identifier-jurisdiction", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://www.usps.com/", + "code": "FL" + } + ] + } + } + ], + "value": "PH21090" + } + }, + { + "url": "code", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://nucc.org/provider-taxonomy", + "code": "333600000X", + "display": "Pharmacy" + } + ] + } + } + ] + } + ], + "identifier": [ + { + "system": "http://hl7.org/fhir/sid/us-npi", + "value": "1700860020", + "period": { + "start": "2005-11-30" + } + } + ], + "active": true, + "type": [ + { + "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/organization-type", "code": "prov", @@ -10429,16 +10699,16 @@ "text": "Pharmacy" } ], - "name": "PHARMA ONE SOFT LLC", + "name": "MIAMI DOWNTOWN PHARMACY, INC", "telecom": [ { "system": "phone", - "value": "870-888-0627", + "value": "305-374-5076", "use": "work" }, { "system": "fax", - "value": "870-888-0627", + "value": "305-371-9524", "use": "work" } ], @@ -10447,11 +10717,11 @@ "use": "work", "type": "physical", "line": [ - "300 S BISCAYNE BLVD APT 3304" + "96 SE 1ST ST" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-5356", + "postalCode": "33131-1008", "country": "US" } ] @@ -10461,12 +10731,12 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1275433062", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1700860020", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1275433062", + "id": "Location-pharmacy-1700860020", "meta": { - "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_110226_110826_Weekly_V2.zip", + "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/lastSourceSync", @@ -10475,7 +10745,7 @@ ] }, "status": "active", - "name": "PHARMA ONE SOFT LLC", + "name": "MIAMI DOWNTOWN PHARMACY, INC", "type": [ { "coding": [ @@ -10485,26 +10755,17 @@ "display": "Pharmacy" } ] - }, - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", - "code": "OUTPHARM", - "display": "outpatient pharmacy" - } - ] } ], "telecom": [ { "system": "phone", - "value": "870-888-0627", + "value": "305-374-5076", "use": "work" }, { "system": "fax", - "value": "870-888-0627", + "value": "305-371-9524", "use": "work" } ], @@ -10512,16 +10773,20 @@ "use": "work", "type": "physical", "line": [ - "300 S BISCAYNE BLVD APT 3304" + "96 SE 1ST ST" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-5356", + "postalCode": "33131-1008", "country": "US" }, + "position": { + "longitude": -80.192151, + "latitude": 25.773281 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1275433062", - "display": "PHARMA ONE SOFT LLC" + "reference": "Organization/Organization-pharmacy-1700860020", + "display": "MIAMI DOWNTOWN PHARMACY, INC" } }, "search": { @@ -10529,10 +10794,10 @@ } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1962417212", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Organization/Organization-pharmacy-1821480708", "resource": { "resourceType": "Organization", - "id": "Organization-pharmacy-1962417212", + "id": "Organization-pharmacy-1821480708", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -10548,11 +10813,7 @@ "extension": [ { "url": "lastUpdated", - "valueDate": "2023-10-31" - }, - { - "url": "certified", - "valueDate": "2023-10-31" + "valueDate": "2015-03-02" } ] }, @@ -10575,7 +10836,7 @@ } } ], - "value": "0000913" + "value": "PH21090" } }, { @@ -10584,8 +10845,8 @@ "coding": [ { "system": "http://nucc.org/provider-taxonomy", - "code": "333600000X", - "display": "Pharmacy" + "code": "3336C0003X", + "display": "Community/Retail Pharmacy" } ] } @@ -10596,9 +10857,9 @@ "identifier": [ { "system": "http://hl7.org/fhir/sid/us-npi", - "value": "1962417212", + "value": "1821480708", "period": { - "start": "2006-07-29" + "start": "2015-03-02" } } ], @@ -10625,14 +10886,16 @@ "text": "Pharmacy" } ], - "name": "WALGREENS #03239", - "alias": [ - "WALGREEN CO" - ], + "name": "MIAMI DOWNTOWN PHARMACY, INC", "telecom": [ { "system": "phone", - "value": "305-373-4320", + "value": "305-374-5075", + "use": "work" + }, + { + "system": "fax", + "value": "305-374-5092", "use": "work" } ], @@ -10641,27 +10904,24 @@ "use": "work", "type": "physical", "line": [ - "1 SE 3RD AVE" + "96 SE 1ST ST" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1700", + "postalCode": "33131-1008", "country": "US" } - ], - "partOf": { - "display": "WALGREENS BOOTS ALLIANCE INC" - } + ] }, "search": { "mode": "include" } }, { - "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1962417212", + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Location/Location-pharmacy-1821480708", "resource": { "resourceType": "Location", - "id": "Location-pharmacy-1962417212", + "id": "Location-pharmacy-1821480708", "meta": { "source": "https://download.cms.gov/nppes/NPPES_Data_Dissemination_November_2026_V2.zip", "extension": [ @@ -10672,7 +10932,7 @@ ] }, "status": "active", - "name": "WALGREENS #03239", + "name": "MIAMI DOWNTOWN PHARMACY, INC", "type": [ { "coding": [ @@ -10696,7 +10956,12 @@ "telecom": [ { "system": "phone", - "value": "305-373-4320", + "value": "305-374-5075", + "use": "work" + }, + { + "system": "fax", + "value": "305-374-5092", "use": "work" } ], @@ -10704,16 +10969,20 @@ "use": "work", "type": "physical", "line": [ - "1 SE 3RD AVE" + "96 SE 1ST ST" ], "city": "MIAMI", "state": "FL", - "postalCode": "33131-1700", + "postalCode": "33131-1008", "country": "US" }, + "position": { + "longitude": -80.192151, + "latitude": 25.773281 + }, "managingOrganization": { - "reference": "Organization/Organization-pharmacy-1962417212", - "display": "WALGREENS #03239" + "reference": "Organization/Organization-pharmacy-1821480708", + "display": "MIAMI DOWNTOWN PHARMACY, INC" } }, "search": { @@ -10899,6 +11168,10 @@ "postalCode": "33131-1003", "country": "US" }, + "position": { + "longitude": -80.193562, + "latitude": 25.774193 + }, "managingOrganization": { "reference": "Organization/Organization-pharmacy-1457367948", "display": "WALGREENS #05251" @@ -13683,14 +13956,14 @@ "Medical Benefits" ], "summary": "Find a plan", - "description": "Search the Medicare Advantage and ACA Marketplace plans being served, by identifier, name, or the state or county a plan is sold in. A search needs at least one of `identifier`, a form of `name`, `coverage-area-state` or `coverage-area-county`; `type` and `sold-to` narrow a search but are not one. Every result is the whole plan, sorted by name and then id, and every page states the total. Follow the `next` link to continue.\n\nA plan sold in only part of a county matches the whole county. `GET /v1/fhir/r4/InsurancePlan/$counties?state=FL` lists a state's counties and their codes.\n\nEvery other parameter is refused by name rather than ignored, so a search never quietly answers a different question than the one asked. `address-state` and `address-postalcode` are refused with a pointer to the coverage-area parameters, because in FHIR R4 they search a plan's contact address.\n\nDrug-only and dental-only plans are not served. An identifier search that finds one answers no plan and an `OperationOutcome` entry saying why.", + "description": "Search the Medicare Advantage and ACA Marketplace plans being served, by identifier, name, or the state or county a plan is sold in. A search needs at least one of `identifier`, a form of `name`, `coverage-area-state` or `coverage-area-county`; `type` and `sold-to` narrow a search but are not one. Every result is the whole plan, sorted by name and then id, and every page states the total. Follow the `next` link to continue.\n\nA plan sold in only part of a county matches the whole county. `GET /v1/fhir/r4/InsurancePlan/$counties?state=FL` lists a state's counties and their codes.\n\nEvery other parameter is refused by name rather than ignored, so a search never quietly answers a different question than the one asked. `address-state` and `address-postalcode` are refused with a pointer to the coverage-area parameters, because in FHIR R4 they search a plan's contact address.\n\nA stand-alone drug plan and a dental-only plan are not medical plans, and no search finds one. An identifier search that matches one answers no plan and an `OperationOutcome` entry saying why. For a stand-alone drug plan in CMS's Part D file the entry names its drug plan's id (`DrugPlan-S5743-001-000`), which `GET /v1/fhir/r4/InsurancePlan/{id}` reads.\n\nA Medicare Advantage plan with Part D names its Part D formulary on its coverage, in the FormularyReference extension of HL7's Da Vinci US Drug Formulary guide. When the formulary could not be read, the plans are answered without it and an `OperationOutcome` entry says so.\n\n`type=DRUGPOL` finds Medicare Part D formularies instead of plans, each as Da Vinci's Formulary, from CMS's monthly file: by `identifier` (CMS's formulary id, `00027002`), a form of `name` or `_id`, or alone for every formulary, in order of id. It refuses the parameters that find plans by where they are sold or to whom. A formulary search is counted as Pharmacy Benefits.", "operationId": "searchInsurancePlan", "parameters": [ { "name": "identifier", "in": "query", "required": false, - "description": "A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant.", + "description": "A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant. With `type=DRUGPOL`, a Medicare Part D formulary by CMS's formulary id, which has no system: `00027002`.", "schema": { "type": "string" }, @@ -13700,7 +13973,7 @@ "name": "name", "in": "query", "required": false, - "description": "The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form.", + "description": "The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form. With `type=DRUGPOL`, the formulary's name.", "schema": { "type": "string", "minLength": 1, @@ -13752,7 +14025,16 @@ "name": "type", "in": "query", "required": false, - "description": "`mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`.", + "description": "`mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`. `DRUGPOL`, from `http://terminology.hl7.org/CodeSystem/v3-ActCode`, finds Medicare Part D formularies instead of plans, and is a search by itself: it takes `identifier`, a form of `name` and `_id`, and refuses the parameters that find plans by where they are sold or to whom.", + "schema": { + "type": "string" + } + }, + { + "name": "_id", + "in": "query", + "required": false, + "description": "With `type=DRUGPOL`, a formulary's id, `Formulary-00027002`, several separated by commas. A plan is read by its id instead: `GET InsurancePlan/{id}`.", "schema": { "type": "string" } @@ -13992,6 +14274,14 @@ ], "coverage": [ { + "extension": [ + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension", + "valueReference": { + "reference": "InsurancePlan/Formulary-00027002" + } + } + ], "type": { "coding": [ { @@ -17736,7 +18026,7 @@ "Medical Benefits" ], "summary": "Read a plan", - "description": "Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from.", + "description": "Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from. A Medicare Advantage plan with Part D names its Part D formulary on its coverage, in Da Vinci's FormularyReference extension; when the formulary could not be read, the plan is answered without it and tagged `SUBSETTED`.\n\nA Medicare Part D formulary is read here too, by its id: `Formulary-00027002`, as the Formulary of HL7's Da Vinci US Drug Formulary guide, 2.1.0, from CMS's monthly file. A formulary read is counted as Pharmacy Benefits.\n\nSo is a Medicare Part D plan's drug plan, by the plan's id after `DrugPlan-`: `DrugPlan-H2406-013-000`. It is an InsurancePlan of its own, beside the plan's medical one, as the PayerInsurancePlan of the same Da Vinci guide: the plan's formulary, its pharmacy networks, its deductible, and what each tier costs for each way to fill a prescription, from CMS's monthly file. The costs are those of the initial coverage phase for a person with no subsidy, each a copay in dollars or a coinsurance in percent, with a qualifier saying whether the plan's deductible comes first; they may not be what a member pays at the pharmacy. A way to fill the guide's codes do not name, a two-month supply or a pharmacy the plan lists as preferred, carries one of eight interim codes (`https://fhir.haau3.com/platform/CodeSystem/part-d-pharmacy-benefit-type`), and a cost the file gives with a minimum or a maximum carries them in the extension `https://fhir.haau3.com/platform/StructureDefinition/part-d-cost-range`. Every plan in CMS's monthly Part D file has a drug plan, a stand-alone drug plan included, which has no medical InsurancePlan; the file leaves out employer plans. No search finds a drug plan. A drug plan read is counted as Pharmacy Benefits.", "operationId": "readInsurancePlan", "parameters": [ { @@ -17747,7 +18037,7 @@ "type": "string", "pattern": "^[A-Za-z0-9\\-.]{1,64}$" }, - "description": "The plan's id: `H2406-013-000` or `19898FL0340001-01`.", + "description": "The plan's id: `H2406-013-000` or `19898FL0340001-01`; a formulary's: `Formulary-00027002`; or a drug plan's: `DrugPlan-H2406-013-000`.", "example": "H2406-013-000" }, { @@ -17938,6 +18228,14 @@ ], "coverage": [ { + "extension": [ + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension", + "valueReference": { + "reference": "InsurancePlan/Formulary-00027002" + } + } + ], "type": { "coding": [ { @@ -20309,7 +20607,7 @@ "$ref": "#/components/responses/FhirForbiddenTestKey" }, "404": { - "description": "No plan with that id is in the releases being served, or the plan is held but is not a medical plan. The `OperationOutcome` says which.", + "description": "No plan with that id is in the releases being served, or the plan is held but is not a medical plan; the `OperationOutcome` says which, and for a stand-alone drug plan in CMS's Part D file names its drug plan's id. For a drug plan: no Medicare Part D plan with that id is in CMS's file for the month, which the `OperationOutcome` names.", "content": { "application/fhir+json": { "schema": { @@ -20354,7 +20652,7 @@ } }, "503": { - "description": "No release of the plan files this request needs is being served on this deployment, and the `OperationOutcome` names the program. The service returns no answer rather than guessing one. It is also the answer when the API key could not be checked just now, with `Retry-After`.", + "description": "No release of the plan files this request needs is being served on this deployment, and the `OperationOutcome` names the program. For a formulary or a drug plan: Medicare Part D's file could not be read just now (send the request again after `Retry-After`), or is not served on this deployment (no `Retry-After`). The service returns no answer rather than guessing one. It is also the answer when the API key could not be checked just now, with `Retry-After`.", "content": { "application/fhir+json": { "schema": { @@ -21684,8 +21982,1010 @@ } } ], - "type": "message", - "timestamp": "2026-10-20T16:00:16Z" + "type": "message", + "timestamp": "2026-10-20T16:00:16Z" + } + } + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "400": { + "description": "The request was refused, before any source was asked: a query parameter (the operation takes none), a body that is not a `message` Bundle (a Parameters resource is refused by name), an event other than the two above (coded `not-supported`), a list over its cap (coded `too-long`: 20 entries, 10 codings on a product, 3 ZIP codes, 10 identifiers on a pharmacy, 20 coverage classes), an element the CARIN profiles require that is missing, a reference that names no entry in the Bundle, a product with no NDC or RxNorm code, a ZIP code that is not five digits or ZIP+4, a request without patient details that names its patient or coverage, a member's request with no Coverage or no payer identifier, a `Payer-Authorization` that is not `Bearer` and a token or is over 4,096 characters (coded `invalid` or `too-long`), or a `Payer-Authorization` sent with a request without patient details (coded `business-rule`), which no price source ever receives. The OperationOutcome names the element by its FHIRPath, or the header by its name, never a value sent.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "401": { + "$ref": "#/components/responses/FhirUnauthorized" + }, + "403": { + "description": "Refused before the operation runs, coded `forbidden`, for one of two reasons. Not yet open to customers: while its price sources are being licensed, every request from a customer's organization is refused, with or without patient details, before its body is read: coded `not-open-to-customers` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`. Or a member's request from an organization without both a business associate agreement (BAA) with haau3 in force and the Team or Scale plan that is not test data marked as such, the request and every resource in it labelled with the `meta.security` coding `HTEST` from `http://terminology.hl7.org/CodeSystem/v3-ActReason`: coded `phi-agreement-required` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`, and a request labelled only in part names the first resources without the label in `expression`. A test key (`haau3_sk_test_…`) works only in the Sandbox, so one sent here is refused before the request runs: coded `forbidden`, with `test-key-outside-sandbox` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`. Send a live key.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + }, + "examples": { + "Not yet open to customers": { + "summary": "Not yet open to customers", + "value": { + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://haau3.com/fhir/CodeSystem/api-error", + "code": "not-open-to-customers", + "display": "Not open to customers" + } + ], + "text": "The real-time pharmacy benefit check is not yet open to customers." + } + } + ] + } + }, + "Patient data without an agreement": { + "summary": "Patient data without an agreement", + "value": { + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://haau3.com/fhir/CodeSystem/api-error", + "code": "phi-agreement-required", + "display": "PHI agreement required" + } + ], + "text": "Real patient data needs a business associate agreement (BAA) with haau3 in force and the Team or Scale plan, and the organization sending this request has no BAA in force. Without both, this operation accepts only test data marked as such: the request and every resource in it labelled with the meta.security coding HTEST from http://terminology.hl7.org/CodeSystem/v3-ActReason. See https://docs.haau3.com/patient-data#test-data" + } + } + ] + } + }, + "A test key outside the Sandbox": { + "summary": "A test key outside the Sandbox", + "value": { + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://haau3.com/fhir/CodeSystem/api-error", + "code": "test-key-outside-sandbox", + "display": "Test key outside the Sandbox" + } + ], + "text": "This is a test key, which works only in the Sandbox (https://api.haau3.com/v1/sandbox/fhir/r4). Send this request with a live key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys" + } + } + ] + } + } + } + } + }, + "headers": { + "WWW-Authenticate": { + "description": "Sent when the API key works only in the other mode: `Bearer realm=\"api.haau3.com\", error=\"insufficient_scope\"`.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "406": { + "$ref": "#/components/responses/FhirNotAcceptable" + }, + "413": { + "description": "The request body is over 1 MiB.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "415": { + "$ref": "#/components/responses/FhirUnsupportedMediaType" + }, + "429": { + "$ref": "#/components/responses/FhirTooManyRequests" + }, + "500": { + "$ref": "#/components/responses/FhirServerError" + }, + "503": { + "description": "No price was returned, and a price source asked did not answer in time or answered with an error, or the member's insurer did not, or the member's request could not be prepared for the insurer, so a later request may be answered. Coded `source-unavailable` in `issue.details.coding`, with `Retry-After`. A source's own words are never repeated. It is also the answer when the API key could not be checked just now, with `Retry-After`.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "Retry-After": { + "description": "Sent when waiting will help: the API key could not be checked just now, or the source behind this service is rate limiting requests or did not answer. How many seconds to wait before sending the request again.", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + } + } + } + }, + "/v1/fhir/r4/Basic": { + "get": { + "tags": [ + "Pharmacy Benefits" + ], + "summary": "Find drugs on a Part D formulary", + "description": "Search the items of the Medicare Part D formularies in CMS's monthly file: each a drug on one formulary, as the FormularyItem of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `Basic`). An item states the drug's tier (`1` to `6`, from `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier`), whether it needs prior authorization or step therapy, its quantity limit, and the ways to fill it that every plan on the formulary prices, and names the month of CMS's file in the `https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month` extension. A search needs `formulary`, `subject` or `_id`; `drug-tier` and `pharmacy-benefit-type` narrow it. `_include=Basic:formulary` adds each item's formulary and `_include=Basic:subject` its drug; `total` counts the items only.\n\nA search that finds no item answers `200` with an `OperationOutcome` entry saying so, with the month of CMS's file: a drug not on a formulary is an answer. A formulary that does not exist is refused by name. A formulary lists what a plan covers; it is not a statement of what a member will pay or be given. Follow the `next` link to continue: its cursor belongs to the one search, and answers `410` once a newer month is served.", + "operationId": "searchBasic", + "parameters": [ + { + "name": "formulary", + "in": "query", + "required": false, + "description": "The formulary an item is on: `InsurancePlan/Formulary-00027002` or `Formulary-00027002`, several separated by commas, up to 20. A formulary that does not exist is refused by name.", + "schema": { + "type": "string" + }, + "example": "InsurancePlan/Formulary-00027002" + }, + { + "name": "subject", + "in": "query", + "required": false, + "description": "The drug: `MedicationKnowledge/FormularyDrug-311354` or `FormularyDrug-311354`, its RxNorm code after `FormularyDrug-`, several separated by commas, up to 20. A search that names a drug and a formulary and finds no item says so in an `OperationOutcome` entry, with the month of CMS's file.", + "schema": { + "type": "string" + }, + "example": "MedicationKnowledge/FormularyDrug-311354" + }, + { + "name": "drug-tier", + "in": "query", + "required": false, + "description": "The Part D tier, `1` to `6`, bare or as `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier|1`, several separated by commas, up to 20. Narrows a search; it is not one by itself.", + "schema": { + "type": "string" + } + }, + { + "name": "pharmacy-benefit-type", + "in": "query", + "required": false, + "description": "A way to fill the drug that every plan on the formulary prices: `1-month-in-retail`, `1-month-in-mail`, `3-month-in-retail`, `3-month-in-mail`, bare or with the system of HL7's Da Vinci US Drug Formulary guide, several separated by commas, up to 20. Narrows a search; it is not one by itself.", + "schema": { + "type": "string" + } + }, + { + "name": "_id", + "in": "query", + "required": false, + "description": "An item's id, `FormularyItem-00027002-311354`, several separated by commas, up to 20.", + "schema": { + "type": "string" + } + }, + { + "name": "_include", + "in": "query", + "required": false, + "style": "form", + "explode": true, + "description": "`Basic:formulary` adds each item's formulary (an InsurancePlan) and `Basic:subject` its drug (a MedicationKnowledge). Send both to have both. Included resources do not count toward `_count`.", + "schema": { + "minItems": 1, + "maxItems": 2, + "type": "array", + "items": { + "type": "string", + "enum": [ + "Basic:formulary", + "Basic:subject" + ] + } + }, + "example": [ + "Basic:formulary", + "Basic:subject" + ] + }, + { + "name": "_count", + "in": "query", + "required": false, + "description": "Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced.", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/XRequestId" + } + ], + "responses": { + "200": { + "description": "A `searchset` Bundle with `total` set: the matching items, then the resources `_include` asked for, then an `OperationOutcome` when no item matched.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/Bundle" + }, + "examples": { + "Lisinopril on the example plan's Part D formulary, with the formulary and the drug": { + "summary": "Lisinopril on the example plan's Part D formulary, with the formulary and the drug", + "value": { + "resourceType": "Bundle", + "type": "searchset", + "total": 1, + "link": [ + { + "relation": "self", + "url": "https://api.haau3.com/v1/fhir/r4/Basic?formulary=InsurancePlan%2FFormulary-00027002&subject=MedicationKnowledge%2FFormularyDrug-311354&_include=Basic%3Aformulary&_include=Basic%3Asubject" + } + ], + "entry": [ + { + "fullUrl": "https://api.haau3.com/v1/fhir/r4/Basic/FormularyItem-00027002-311354", + "resource": { + "resourceType": "Basic", + "id": "FormularyItem-00027002-311354", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem|2.1.0" + ] + }, + "extension": [ + { + "url": "https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month", + "valueDate": "2026-11" + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension", + "valueReference": { + "reference": "InsurancePlan/Formulary-00027002" + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityStatus-extension", + "valueCode": "active" + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityPeriod-extension", + "valuePeriod": { + "start": "2027-01-01", + "end": "2027-12-31" + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "1-month-in-retail", + "display": "1 month in network retail" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "3-month-in-retail", + "display": "3 month in network retail" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "3-month-in-mail", + "display": "3 month in network mail order" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierID-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier", + "code": "1", + "display": "Tier 1" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PriorAuthorization-extension", + "valueBoolean": false + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-StepTherapyLimit-extension", + "valueBoolean": false + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimit-extension", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimitDetail-extension", + "extension": [ + { + "url": "Rolling", + "valueTiming": { + "repeat": { + "count": 60, + "period": 30, + "periodUnit": "d" + } + } + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-InsuranceItemTypeCS", + "code": "formulary-item", + "display": "Formulary Item" + } + ] + }, + "subject": { + "reference": "MedicationKnowledge/FormularyDrug-311354" + } + }, + "search": { + "mode": "match" + } + }, + { + "fullUrl": "https://api.haau3.com/v1/fhir/r4/InsurancePlan/Formulary-00027002", + "resource": { + "resourceType": "InsurancePlan", + "id": "Formulary-00027002", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-Formulary|2.1.0" + ] + }, + "extension": [ + { + "url": "https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month", + "valueDate": "2026-11" + } + ], + "identifier": [ + { + "value": "00027002" + } + ], + "status": "active", + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "DRUGPOL" + } + ] + } + ], + "name": "Medicare Part D formulary 00027002, contract year 2027", + "period": { + "start": "2027-01-01", + "end": "2027-12-31" + } + }, + "search": { + "mode": "include" + } + }, + { + "fullUrl": "https://api.haau3.com/v1/fhir/r4/MedicationKnowledge/FormularyDrug-311354", + "resource": { + "resourceType": "MedicationKnowledge", + "id": "FormularyDrug-311354", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug|2.1.0" + ] + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "311354", + "display": "lisinopril 5 MG Oral Tablet" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164689", + "display": "lisinopril Oral Product" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164690", + "display": "lisinopril Pill" + } + ] + }, + "status": "active" + }, + "search": { + "mode": "include" + } + } + ] + } + } + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "400": { + "description": "A parameter this service does not serve, among them those HL7's Da Vinci US Drug Formulary guide defines that it does not, each named with its reason; a parameter sent more times than it takes; a value of the wrong form; a search with none of the parameters it needs; or a page that is not this search's. One issue per offending parameter, naming it.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "401": { + "$ref": "#/components/responses/FhirUnauthorized" + }, + "403": { + "$ref": "#/components/responses/FhirForbiddenTestKey" + }, + "404": { + "description": "No such interaction on this base.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "406": { + "$ref": "#/components/responses/FhirNotAcceptable" + }, + "410": { + "description": "A newer month of CMS's file is served since this search began, so its later pages no longer exist. Start the search again.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "429": { + "$ref": "#/components/responses/FhirTooManyRequests" + }, + "500": { + "$ref": "#/components/responses/FhirServerError" + }, + "503": { + "description": "The Medicare Part D formulary could not be read just now (send the request again after `Retry-After`), or is not served on this deployment (no `Retry-After`). Never reported as an empty result or a drug not on a formulary. It is also the answer when the API key could not be checked just now, with `Retry-After`.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "Retry-After": { + "description": "Sent when waiting will help: the API key could not be checked just now, or the source behind this service is rate limiting requests or did not answer. How many seconds to wait before sending the request again.", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + } + } + } + }, + "/v1/fhir/r4/Basic/{id}": { + "get": { + "tags": [ + "Pharmacy Benefits" + ], + "summary": "Read a drug on a Part D formulary", + "description": "Read one item of a Medicare Part D formulary by its id, `FormularyItem-` followed by CMS's formulary id and the drug's RxNorm code: `FormularyItem-00027002-311354`. So a caller holding a formulary and an RxNorm code reads the item with no search. A drug not on the formulary answers `404`, saying so with the month of CMS's file.", + "operationId": "readBasic", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[A-Za-z0-9\\-.]{1,64}$" + }, + "description": "The item's id: `FormularyItem-00027002-311354`.", + "example": "FormularyItem-00027002-311354" + }, + { + "$ref": "#/components/parameters/XRequestId" + } + ], + "responses": { + "200": { + "description": "The item, as Da Vinci's FormularyItem.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/Basic" + }, + "examples": { + "Lisinopril on a Part D formulary": { + "summary": "Lisinopril on a Part D formulary", + "value": { + "resourceType": "Basic", + "id": "FormularyItem-00027002-311354", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem|2.1.0" + ] + }, + "extension": [ + { + "url": "https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month", + "valueDate": "2026-11" + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension", + "valueReference": { + "reference": "InsurancePlan/Formulary-00027002" + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityStatus-extension", + "valueCode": "active" + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityPeriod-extension", + "valuePeriod": { + "start": "2027-01-01", + "end": "2027-12-31" + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "1-month-in-retail", + "display": "1 month in network retail" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "3-month-in-retail", + "display": "3 month in network retail" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PharmacyBenefitType-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-PharmacyBenefitTypeCS-TEMPORARY-TRIAL-USE", + "code": "3-month-in-mail", + "display": "3 month in network mail order" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierID-extension", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier", + "code": "1", + "display": "Tier 1" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-PriorAuthorization-extension", + "valueBoolean": false + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-StepTherapyLimit-extension", + "valueBoolean": false + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimit-extension", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-QuantityLimitDetail-extension", + "extension": [ + { + "url": "Rolling", + "valueTiming": { + "repeat": { + "count": 60, + "period": 30, + "periodUnit": "d" + } + } + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/davinci-drug-formulary/CodeSystem/usdf-InsuranceItemTypeCS", + "code": "formulary-item", + "display": "Formulary Item" + } + ] + }, + "subject": { + "reference": "MedicationKnowledge/FormularyDrug-311354" + } + } + } + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "400": { + "description": "A query parameter was sent: a read takes none.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "401": { + "$ref": "#/components/responses/FhirUnauthorized" + }, + "403": { + "$ref": "#/components/responses/FhirForbiddenTestKey" + }, + "404": { + "description": "The drug is not on the formulary in CMS's file for the month named, the formulary is not in it, or the id names no item. The `OperationOutcome` says which.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "406": { + "$ref": "#/components/responses/FhirNotAcceptable" + }, + "429": { + "$ref": "#/components/responses/FhirTooManyRequests" + }, + "500": { + "$ref": "#/components/responses/FhirServerError" + }, + "503": { + "description": "The Medicare Part D formulary could not be read just now (send the request again after `Retry-After`), or is not served on this deployment (no `Retry-After`). Never reported as an empty result or a drug not on a formulary. It is also the answer when the API key could not be checked just now, with `Retry-After`.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "Retry-After": { + "description": "Sent when waiting will help: the API key could not be checked just now, or the source behind this service is rate limiting requests or did not answer. How many seconds to wait before sending the request again.", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + } + } + } + }, + "/v1/fhir/r4/MedicationKnowledge": { + "get": { + "tags": [ + "Pharmacy Benefits" + ], + "summary": "Find drugs any Part D formulary lists", + "description": "Search the drugs the Medicare Part D formularies in CMS's monthly file list, each as the FormularyDrug of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `MedicationKnowledge`): its RxNorm code and name, then each dose form group RxNorm puts it in, named from haau3's RxNorm release. A search needs `code`, `drug-name` or `_id`. `code` matches a drug's own code or one of its groups', and `drug-name` the start of either's name. To find the formularies a drug is on, search `Basic` by `subject`.", + "operationId": "searchMedicationKnowledge", + "parameters": [ + { + "name": "code", + "in": "query", + "required": false, + "description": "An RxNorm code, bare or as `http://www.nlm.nih.gov/research/umls/rxnorm|311354`, several separated by commas, up to 20. It matches a drug's own code or one of its dose form groups', so a group's code finds every drug in it.", + "schema": { + "type": "string" + }, + "example": "311354" + }, + { + "name": "drug-name", + "in": "query", + "required": false, + "description": "The start of RxNorm's name for the drug or one of its dose form groups, ignoring case: `lisinopril 5`. 1 to 100 characters.", + "schema": { + "type": "string" + } + }, + { + "name": "_id", + "in": "query", + "required": false, + "description": "A drug's id, `FormularyDrug-311354`, several separated by commas, up to 20.", + "schema": { + "type": "string" + } + }, + { + "name": "_count", + "in": "query", + "required": false, + "description": "Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced.", + "schema": { + "default": 25, + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/XRequestId" + } + ], + "responses": { + "200": { + "description": "A `searchset` Bundle with `total` set, and an `OperationOutcome` entry when no drug matched.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/Bundle" + }, + "examples": { + "Lisinopril 5 MG Oral Tablet by its RxNorm code": { + "summary": "Lisinopril 5 MG Oral Tablet by its RxNorm code", + "value": { + "resourceType": "Bundle", + "type": "searchset", + "total": 1, + "link": [ + { + "relation": "self", + "url": "https://api.haau3.com/v1/fhir/r4/MedicationKnowledge?code=311354" + } + ], + "entry": [ + { + "fullUrl": "https://api.haau3.com/v1/fhir/r4/MedicationKnowledge/FormularyDrug-311354", + "resource": { + "resourceType": "MedicationKnowledge", + "id": "FormularyDrug-311354", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug|2.1.0" + ] + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "311354", + "display": "lisinopril 5 MG Oral Tablet" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164689", + "display": "lisinopril Oral Product" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164690", + "display": "lisinopril Pill" + } + ] + }, + "status": "active" + }, + "search": { + "mode": "match" + } + } + ] } } } @@ -21701,7 +23001,7 @@ } }, "400": { - "description": "The request was refused, before any source was asked: a query parameter (the operation takes none), a body that is not a `message` Bundle (a Parameters resource is refused by name), an event other than the two above (coded `not-supported`), a list over its cap (coded `too-long`: 20 entries, 10 codings on a product, 3 ZIP codes, 10 identifiers on a pharmacy, 20 coverage classes), an element the CARIN profiles require that is missing, a reference that names no entry in the Bundle, a product with no NDC or RxNorm code, a ZIP code that is not five digits or ZIP+4, a request without patient details that names its patient or coverage, a member's request with no Coverage or no payer identifier, a `Payer-Authorization` that is not `Bearer` and a token or is over 4,096 characters (coded `invalid` or `too-long`), or a `Payer-Authorization` sent with a request without patient details (coded `business-rule`), which no price source ever receives. The OperationOutcome names the element by its FHIRPath, or the header by its name, never a value sent.", + "description": "A parameter this service does not serve, among them those HL7's Da Vinci US Drug Formulary guide defines that it does not, each named with its reason; a parameter sent more times than it takes; a value of the wrong form; a search with none of the parameters it needs; or a page that is not this search's. One issue per offending parameter, naming it.", "content": { "application/fhir+json": { "schema": { @@ -21722,89 +23022,170 @@ "$ref": "#/components/responses/FhirUnauthorized" }, "403": { - "description": "Refused before the operation runs, coded `forbidden`, for one of two reasons. Not yet open to customers: while its price sources are being licensed, every request from a customer's organization is refused, with or without patient details, before its body is read: coded `not-open-to-customers` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`. Or a member's request from an organization without both a business associate agreement (BAA) with haau3 in force and the Team or Scale plan that is not test data marked as such, the request and every resource in it labelled with the `meta.security` coding `HTEST` from `http://terminology.hl7.org/CodeSystem/v3-ActReason`: coded `phi-agreement-required` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`, and a request labelled only in part names the first resources without the label in `expression`. A test key (`haau3_sk_test_…`) works only in the Sandbox, so one sent here is refused before the request runs: coded `forbidden`, with `test-key-outside-sandbox` from `https://haau3.com/fhir/CodeSystem/api-error` in `issue.details.coding`. Send a live key.", + "$ref": "#/components/responses/FhirForbiddenTestKey" + }, + "404": { + "description": "No such interaction on this base.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "406": { + "$ref": "#/components/responses/FhirNotAcceptable" + }, + "410": { + "description": "A newer month of CMS's file is served since this search began, so its later pages no longer exist. Start the search again.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "429": { + "$ref": "#/components/responses/FhirTooManyRequests" + }, + "500": { + "$ref": "#/components/responses/FhirServerError" + }, + "503": { + "description": "The Medicare Part D formulary could not be read just now (send the request again after `Retry-After`), or is not served on this deployment (no `Retry-After`). Never reported as an empty result or a drug not on a formulary. It is also the answer when the API key could not be checked just now, with `Retry-After`.", "content": { "application/fhir+json": { "schema": { "$ref": "#/components/schemas/OperationOutcome" + } + } + }, + "headers": { + "Retry-After": { + "description": "Sent when waiting will help: the API key could not be checked just now, or the source behind this service is rate limiting requests or did not answer. How many seconds to wait before sending the request again.", + "schema": { + "type": "integer", + "minimum": 0 + } + }, + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + } + } + } + }, + "/v1/fhir/r4/MedicationKnowledge/{id}": { + "get": { + "tags": [ + "Pharmacy Benefits" + ], + "summary": "Read a drug a Part D formulary lists", + "description": "Read one drug by its id, `FormularyDrug-` followed by its RxNorm code: `FormularyDrug-311354`. A drug no Part D formulary lists answers `404`.", + "operationId": "readMedicationKnowledge", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[A-Za-z0-9\\-.]{1,64}$" + }, + "description": "The drug's id: `FormularyDrug-311354`.", + "example": "FormularyDrug-311354" + }, + { + "$ref": "#/components/parameters/XRequestId" + } + ], + "responses": { + "200": { + "description": "The drug, as Da Vinci's FormularyDrug.", + "content": { + "application/fhir+json": { + "schema": { + "$ref": "#/components/schemas/MedicationKnowledge" }, "examples": { - "Not yet open to customers": { - "summary": "Not yet open to customers", - "value": { - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://haau3.com/fhir/CodeSystem/api-error", - "code": "not-open-to-customers", - "display": "Not open to customers" - } - ], - "text": "The real-time pharmacy benefit check is not yet open to customers." - } - } - ] - } - }, - "Patient data without an agreement": { - "summary": "Patient data without an agreement", - "value": { - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://haau3.com/fhir/CodeSystem/api-error", - "code": "phi-agreement-required", - "display": "PHI agreement required" - } - ], - "text": "Real patient data needs a business associate agreement (BAA) with haau3 in force and the Team or Scale plan, and the organization sending this request has no BAA in force. Without both, this operation accepts only test data marked as such: the request and every resource in it labelled with the meta.security coding HTEST from http://terminology.hl7.org/CodeSystem/v3-ActReason. See https://docs.haau3.com/patient-data#test-data" - } - } - ] - } - }, - "A test key outside the Sandbox": { - "summary": "A test key outside the Sandbox", + "Lisinopril 5 MG Oral Tablet": { + "summary": "Lisinopril 5 MG Oral Tablet", "value": { - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://haau3.com/fhir/CodeSystem/api-error", - "code": "test-key-outside-sandbox", - "display": "Test key outside the Sandbox" - } - ], - "text": "This is a test key, which works only in the Sandbox (https://api.haau3.com/v1/sandbox/fhir/r4). Send this request with a live key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys" + "resourceType": "MedicationKnowledge", + "id": "FormularyDrug-311354", + "meta": { + "lastUpdated": "2026-12-01T23:00:45.878Z", + "source": "https://data.cms.gov/sites/default/files/2026-11/796eebd3-4f54-43e3-90a4-c20cc0696767/2027_20261118.zip", + "profile": [ + "http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug|2.1.0" + ] + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "311354", + "display": "lisinopril 5 MG Oral Tablet" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164689", + "display": "lisinopril Oral Product" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1164690", + "display": "lisinopril Pill" } - } - ] + ] + }, + "status": "active" } } } } }, "headers": { - "WWW-Authenticate": { - "description": "Sent when the API key works only in the other mode: `Bearer realm=\"api.haau3.com\", error=\"insufficient_scope\"`.", + "X-Request-Id": { + "$ref": "#/components/headers/XRequestId" + }, + "X-Correlation-Id": { + "$ref": "#/components/headers/XCorrelationId" + } + } + }, + "400": { + "description": "A query parameter was sent: a read takes none.", + "content": { + "application/fhir+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/OperationOutcome" } - }, + } + }, + "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" }, @@ -21813,11 +23194,14 @@ } } }, - "406": { - "$ref": "#/components/responses/FhirNotAcceptable" + "401": { + "$ref": "#/components/responses/FhirUnauthorized" }, - "413": { - "description": "The request body is over 1 MiB.", + "403": { + "$ref": "#/components/responses/FhirForbiddenTestKey" + }, + "404": { + "description": "No Part D formulary lists this drug in CMS's file for the month named, or the id names no drug.", "content": { "application/fhir+json": { "schema": { @@ -21834,8 +23218,8 @@ } } }, - "415": { - "$ref": "#/components/responses/FhirUnsupportedMediaType" + "406": { + "$ref": "#/components/responses/FhirNotAcceptable" }, "429": { "$ref": "#/components/responses/FhirTooManyRequests" @@ -21844,7 +23228,7 @@ "$ref": "#/components/responses/FhirServerError" }, "503": { - "description": "No price was returned, and a price source asked did not answer in time or answered with an error, or the member's insurer did not, or the member's request could not be prepared for the insurer, so a later request may be answered. Coded `source-unavailable` in `issue.details.coding`, with `Retry-After`. A source's own words are never repeated. It is also the answer when the API key could not be checked just now, with `Retry-After`.", + "description": "The Medicare Part D formulary could not be read just now (send the request again after `Retry-After`), or is not served on this deployment (no `Retry-After`). Never reported as an empty result or a drug not on a formulary. It is also the answer when the API key could not be checked just now, with `Retry-After`.", "content": { "application/fhir+json": { "schema": { @@ -24476,6 +25860,34 @@ ], "additionalProperties": true }, + "Basic": { + "type": "object", + "description": "A FHIR R4 [Basic](https://hl7.org/fhir/R4/basic.html).", + "properties": { + "resourceType": { + "type": "string", + "const": "Basic" + } + }, + "required": [ + "resourceType" + ], + "additionalProperties": true + }, + "MedicationKnowledge": { + "type": "object", + "description": "A FHIR R4 [MedicationKnowledge](https://hl7.org/fhir/R4/medicationknowledge.html).", + "properties": { + "resourceType": { + "type": "string", + "const": "MedicationKnowledge" + } + }, + "required": [ + "resourceType" + ], + "additionalProperties": true + }, "Slot": { "type": "object", "description": "A FHIR R4 [Slot](https://hl7.org/fhir/R4/slot.html).", diff --git a/src/haau3/_bundle_reads.py b/src/haau3/_bundle_reads.py index b4e3500..0bf4d3f 100644 --- a/src/haau3/_bundle_reads.py +++ b/src/haau3/_bundle_reads.py @@ -14,6 +14,14 @@ from ._bundles import matches_in, resolve_in +@overload +def resolve( + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["Basic"], + from_: fhir.Resource | None = None, +) -> fhir.Basic | None: ... @overload def resolve( bundle: fhir.Bundle, @@ -87,6 +95,14 @@ def resolve( from_: fhir.Resource | None = None, ) -> fhir.Medication | None: ... @overload +def resolve( + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["MedicationKnowledge"], + from_: fhir.Resource | None = None, +) -> fhir.MedicationKnowledge | None: ... +@overload def resolve( bundle: fhir.Bundle, reference: fhir.Reference | str | None, @@ -219,7 +235,6 @@ def resolve( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -280,7 +295,6 @@ def resolve( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", @@ -364,6 +378,8 @@ def resolve( return resolve_in(bundle, reference, type=type, from_=from_) +@overload +def matches(page: fhir.Bundle, type: Literal["Basic"]) -> list[fhir.Basic]: ... @overload def matches(page: fhir.Bundle, type: Literal["Bundle"]) -> list[fhir.Bundle]: ... @overload @@ -383,6 +399,8 @@ def matches(page: fhir.Bundle, type: Literal["Location"]) -> list[fhir.Location] @overload def matches(page: fhir.Bundle, type: Literal["Medication"]) -> list[fhir.Medication]: ... @overload +def matches(page: fhir.Bundle, type: Literal["MedicationKnowledge"]) -> list[fhir.MedicationKnowledge]: ... +@overload def matches(page: fhir.Bundle, type: Literal["MedicationRequest"]) -> list[fhir.MedicationRequest]: ... @overload def matches(page: fhir.Bundle, type: Literal["MedicationStatement"]) -> list[fhir.MedicationStatement]: ... @@ -423,7 +441,6 @@ def matches( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -484,7 +501,6 @@ def matches( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", diff --git a/src/haau3/_methods.py b/src/haau3/_methods.py index f072354..d69ae10 100644 --- a/src/haau3/_methods.py +++ b/src/haau3/_methods.py @@ -28,10 +28,12 @@ FHIR_METADATA, LIST_INSURANCE_PLAN_COUNTIES, PROCESS_MESSAGE, + READ_BASIC, READ_ENDPOINT, READ_HEALTHCARE_SERVICE, READ_INSURANCE_PLAN, READ_LOCATION, + READ_MEDICATION_KNOWLEDGE, READ_ORGANIZATION, READ_ORGANIZATION_AFFILIATION, READ_PRACTITIONER, @@ -42,10 +44,12 @@ RECONCILE_MEDICATIONS, SANDBOX_METADATA, SANDBOX_PROCESS_MESSAGE, + SEARCH_BASIC, SEARCH_ENDPOINT, SEARCH_HEALTHCARE_SERVICE, SEARCH_INSURANCE_PLAN, SEARCH_LOCATION, + SEARCH_MEDICATION_KNOWLEDGE, SEARCH_ORGANIZATION, SEARCH_ORGANIZATION_AFFILIATION, SEARCH_PRACTITIONER, @@ -345,6 +349,26 @@ def process_message( PROCESS_MESSAGE, (), (), hidden, Options(timeout, max_retries, correlation_id, extra_headers, declared) ).data + def read_basic( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Basic: + """Read a drug on a Part D formulary + + Read one item of a Medicare Part D formulary by its id, `FormularyItem-` followed by CMS's formulary id and the drug's RxNorm code: `FormularyItem-00027002-311354`. So a caller holding a formulary and an RxNorm code reads the item with no search. A drug not on the formulary answers `404`, saying so with the month of CMS's file. + + `GET /v1/fhir/r4/Basic/{id}`, https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-on-a-part-d-formulary + """ + return self._engine.call( + READ_BASIC, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ).data + def read_endpoint( self, id: str, @@ -399,7 +423,11 @@ def read_insurance_plan( ) -> fhir.InsurancePlan: """Read a plan - Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from. + Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from. A Medicare Advantage plan with Part D names its Part D formulary on its coverage, in Da Vinci's FormularyReference extension; when the formulary could not be read, the plan is answered without it and tagged `SUBSETTED`. + + A Medicare Part D formulary is read here too, by its id: `Formulary-00027002`, as the Formulary of HL7's Da Vinci US Drug Formulary guide, 2.1.0, from CMS's monthly file. A formulary read is counted as Pharmacy Benefits. + + So is a Medicare Part D plan's drug plan, by the plan's id after `DrugPlan-`: `DrugPlan-H2406-013-000`. It is an InsurancePlan of its own, beside the plan's medical one, as the PayerInsurancePlan of the same Da Vinci guide: the plan's formulary, its pharmacy networks, its deductible, and what each tier costs for each way to fill a prescription, from CMS's monthly file. The costs are those of the initial coverage phase for a person with no subsidy, each a copay in dollars or a coinsurance in percent, with a qualifier saying whether the plan's deductible comes first; they may not be what a member pays at the pharmacy. A way to fill the guide's codes do not name, a two-month supply or a pharmacy the plan lists as preferred, carries one of eight interim codes (`https://fhir.haau3.com/platform/CodeSystem/part-d-pharmacy-benefit-type`), and a cost the file gives with a minimum or a maximum carries them in the extension `https://fhir.haau3.com/platform/StructureDefinition/part-d-cost-range`. Every plan in CMS's monthly Part D file has a drug plan, a stand-alone drug plan included, which has no medical InsurancePlan; the file leaves out employer plans. No search finds a drug plan. A drug plan read is counted as Pharmacy Benefits. `GET /v1/fhir/r4/InsurancePlan/{id}`, https://docs.haau3.com/api-reference/medical-benefits/read-a-plan """ @@ -429,6 +457,26 @@ def read_location( READ_LOCATION, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) ).data + def read_medication_knowledge( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.MedicationKnowledge: + """Read a drug a Part D formulary lists + + Read one drug by its id, `FormularyDrug-` followed by its RxNorm code: `FormularyDrug-311354`. A drug no Part D formulary lists answers `404`. + + `GET /v1/fhir/r4/MedicationKnowledge/{id}`, https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-a-part-d-formulary-lists + """ + return self._engine.call( + READ_MEDICATION_KNOWLEDGE, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ).data + def read_organization( self, id: str, @@ -441,7 +489,7 @@ def read_organization( ) -> fhir.Organization: """Read an Organization - Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search on `HealthcareService`) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. + Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. `GET /v1/fhir/r4/Organization/{id}`, https://docs.haau3.com/api-reference/provider-directory/read-an-organization """ @@ -666,6 +714,60 @@ def sandbox_process_message( Options(timeout, max_retries, correlation_id, extra_headers, declared), ).data + def search_basic( + self, + *, + formulary: str | None = None, + subject: str | None = None, + drug_tier: str | None = None, + pharmacy_benefit_type: str | None = None, + id: str | None = None, + include: Literal["Basic:formulary", "Basic:subject"] + | Sequence[Literal["Basic:formulary", "Basic:subject"]] + | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Bundle: + """Find drugs on a Part D formulary + + Search the items of the Medicare Part D formularies in CMS's monthly file: each a drug on one formulary, as the FormularyItem of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `Basic`). An item states the drug's tier (`1` to `6`, from `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier`), whether it needs prior authorization or step therapy, its quantity limit, and the ways to fill it that every plan on the formulary prices, and names the month of CMS's file in the `https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month` extension. A search needs `formulary`, `subject` or `_id`; `drug-tier` and `pharmacy-benefit-type` narrow it. `_include=Basic:formulary` adds each item's formulary and `_include=Basic:subject` its drug; `total` counts the items only. + + A search that finds no item answers `200` with an `OperationOutcome` entry saying so, with the month of CMS's file: a drug not on a formulary is an answer. A formulary that does not exist is refused by name. A formulary lists what a plan covers; it is not a statement of what a member will pay or be given. Follow the `next` link to continue: its cursor belongs to the one search, and answers `410` once a newer month is served. + + `GET /v1/fhir/r4/Basic`, https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-on-a-part-d-formulary + + Query parameters, each with its name in the API: + + - `formulary`: The formulary an item is on: `InsurancePlan/Formulary-00027002` or `Formulary-00027002`, several separated by commas, up to 20. A formulary that does not exist is refused by name. + - `subject`: The drug: `MedicationKnowledge/FormularyDrug-311354` or `FormularyDrug-311354`, its RxNorm code after `FormularyDrug-`, several separated by commas, up to 20. A search that names a drug and a formulary and finds no item says so in an `OperationOutcome` entry, with the month of CMS's file. + - `drug_tier` (`drug-tier`): The Part D tier, `1` to `6`, bare or as `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier|1`, several separated by commas, up to 20. Narrows a search; it is not one by itself. + - `pharmacy_benefit_type` (`pharmacy-benefit-type`): A way to fill the drug that every plan on the formulary prices: `1-month-in-retail`, `1-month-in-mail`, `3-month-in-retail`, `3-month-in-mail`, bare or with the system of HL7's Da Vinci US Drug Formulary guide, several separated by commas, up to 20. Narrows a search; it is not one by itself. + - `id` (`_id`): An item's id, `FormularyItem-00027002-311354`, several separated by commas, up to 20. + - `include` (`_include`): `Basic:formulary` adds each item's formulary (an InsurancePlan) and `Basic:subject` its drug (a MedicationKnowledge). Send both to have both. Included resources do not count toward `_count`. + - `count` (`_count`): Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced. + - `page`: The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again. + """ + return self._engine.call( + SEARCH_BASIC, + (), + ( + ("formulary", formulary), + ("subject", subject), + ("drug-tier", drug_tier), + ("pharmacy-benefit-type", pharmacy_benefit_type), + ("_id", id), + ("_include", include), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ).data + def search_endpoint( self, *, @@ -729,6 +831,7 @@ def search_healthcare_service( location_address_state: str | None = None, location_address_postalcode: str | None = None, location_address_city: str | None = None, + location_near: str | None = None, name: str | None = None, organization: str | None = None, organization_identifier: str | None = None, @@ -751,9 +854,9 @@ def search_healthcare_service( **The directory's services**, by location, or by network beside a location. The directory's service records name a network and, for a few, a location; none names an organization, so `organization` is refused on this search rather than answered with nothing. - **Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle. + **Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle. - Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, until CMS's National Provider Directory serves them. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if the search moved to the directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy. + A pharmacy search that sends `location.near`, or a five-digit ZIP code or ZIP+4 in `location.address-postalcode`, comes nearest first: from the point sent, or from the ZIP code area's internal point as the U.S. Census Bureau publishes it. Each match carries its straight-line distance in `search.extension`, HL7's `location-distance` (`http://hl7.org/fhir/StructureDefinition/location-distance`), in the unit `location.near` asked for and otherwise in kilometres, and ties go by NPI. A store's point is in `Location.position`, from the U.S. Census Bureau's geocoder, which places an address along its street's range of numbers. A store it could not place has no `position` and is measured from its own ZIP code area's point instead, its distance marked approximate by haau3's `location-distance-approximate` extension (`https://fhir.haau3.com/platform/StructureDefinition/location-distance-approximate`, `true`); a point search includes it when that point is within its distance. Every store at its own point comes first, then every one measured from its ZIP code area's point, each nearest first, then every one with neither, with no distance, which a point search leaves out. A search by a ZIP code's first digits, or by a ZIP code the Census Bureau gives no area, is not measured: it comes in the order below, and its bundle says so in an `OperationOutcome` entry. Any other pharmacy search comes in one fixed order, the pharmacy's name ignoring case and then its NPI. Every order is the same on every page, the searchset carries `total`, and a continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy. **A Medicare Part D plan's pharmacies**: add `network` to a pharmacy search. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry. @@ -763,11 +866,12 @@ def search_healthcare_service( - `location`: The services offered at one location. Give a Location id, `Location/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - `network`: The services in one insurance network, one network a search. On the directory's own search, the services the directory lists in the network; there it cannot be used on its own, so send it beside `location`. On a pharmacy search, the pharmacies one of a Medicare Part D plan's networks lists. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - - `service_category` (`service-category`): `pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. - - `specialty`: A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. + - `service_category` (`service-category`): `pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. + - `specialty`: A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. - `location_address_state` (`location.address-state`): A pharmacy search's state: the two-letter code of the state the pharmacy's store is in. Stands alone on a pharmacy search, and is required beside `location.address-city`. - `location_address_postalcode` (`location.address-postalcode`): Finds the pharmacies whose store's ZIP code starts with this: a ZIP code, ZIP+4, or its first two or more digits. Stands alone on a pharmacy search. - `location_address_city` (`location.address-city`): Narrows a pharmacy search to stores in a city whose name starts with this, so `Miami` also finds Miami Beach. Two or more letters. Send it with `location.address-state`. + - `location_near` (`location.near`): Finds pharmacies near a point, nearest first: FHIR's `near` on the pharmacy's store, as `[latitude]|[longitude]|[distance]|[units]`, in decimal degrees (WGS84), for example `25.7743|-80.1937|5|[mi_us]`. Only pharmacies within that straight-line distance are returned, nearest first. `distance` is at most 50 miles (80.46 km), and without it a point search reaches 50 miles. `units` is `km` (the default) or `[mi_us]` for miles, and each match's distance comes back in the same unit. One point per search. Stands alone on a pharmacy search, and narrows any other. - `name`: Finds the pharmacies whose name, or a name they do business as, starts with this. Two or more letters. Stands alone on a pharmacy search. - `organization`: One pharmacy: the organization that provides it, as a pharmacy search returned it (`Organization-pharmacy-{NPI}`). Stands alone on a pharmacy search. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - `organization_identifier` (`organization.identifier`): One pharmacy by its NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Organization` accepts. Stands alone on a pharmacy search. @@ -789,6 +893,7 @@ def search_healthcare_service( ("location.address-state", location_address_state), ("location.address-postalcode", location_address_postalcode), ("location.address-city", location_address_city), + ("location.near", location_near), ("name", name), ("organization", organization), ("organization.identifier", organization_identifier), @@ -813,6 +918,7 @@ def search_insurance_plan( coverage_area_state: str | None = None, coverage_area_county: str | None = None, type: str | None = None, + id: str | None = None, sold_to: Literal["individuals", "employer-groups"] | None = None, count: int | None = None, page: str | None = None, @@ -829,19 +935,24 @@ def search_insurance_plan( Every other parameter is refused by name rather than ignored, so a search never quietly answers a different question than the one asked. `address-state` and `address-postalcode` are refused with a pointer to the coverage-area parameters, because in FHIR R4 they search a plan's contact address. - Drug-only and dental-only plans are not served. An identifier search that finds one answers no plan and an `OperationOutcome` entry saying why. + A stand-alone drug plan and a dental-only plan are not medical plans, and no search finds one. An identifier search that matches one answers no plan and an `OperationOutcome` entry saying why. For a stand-alone drug plan in CMS's Part D file the entry names its drug plan's id (`DrugPlan-S5743-001-000`), which `GET /v1/fhir/r4/InsurancePlan/{id}` reads. + + A Medicare Advantage plan with Part D names its Part D formulary on its coverage, in the FormularyReference extension of HL7's Da Vinci US Drug Formulary guide. When the formulary could not be read, the plans are answered without it and an `OperationOutcome` entry says so. + + `type=DRUGPOL` finds Medicare Part D formularies instead of plans, each as Da Vinci's Formulary, from CMS's monthly file: by `identifier` (CMS's formulary id, `00027002`), a form of `name` or `_id`, or alone for every formulary, in order of id. It refuses the parameters that find plans by where they are sold or to whom. A formulary search is counted as Pharmacy Benefits. `GET /v1/fhir/r4/InsurancePlan`, https://docs.haau3.com/api-reference/medical-benefits/find-a-plan Query parameters, each with its name in the API: - - `identifier`: A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant. - - `name`: The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form. + - `identifier`: A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant. With `type=DRUGPOL`, a Medicare Part D formulary by CMS's formulary id, which has no system: `00027002`. + - `name`: The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form. With `type=DRUGPOL`, the formulary's name. - `name_contains` (`name:contains`): Part of the plan's name, anywhere in it, ignoring case and accents. - `name_exact` (`name:exact`): The plan's whole name, exactly. - `coverage_area_state` (`coverage-area-state`): A two-letter state code: the plans sold in that state. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-coverage-area-state`). - `coverage_area_county` (`coverage-area-county`): A five-digit FIPS state and county code (`12086`, Miami-Dade County, Florida), bare or as `http://terminology.hl7.org/CodeSystem/FIPS64|12086`: the plans sold in that county, in whole or in part. A code that names no county is refused. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-coverage-area-county`). - - `type`: `mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`. + - `type`: `mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`. `DRUGPOL`, from `http://terminology.hl7.org/CodeSystem/v3-ActCode`, finds Medicare Part D formularies instead of plans, and is a search by itself: it takes `identifier`, a form of `name` and `_id`, and refuses the parameters that find plans by where they are sold or to whom. + - `id` (`_id`): With `type=DRUGPOL`, a formulary's id, `Formulary-00027002`, several separated by commas. A plan is read by its id instead: `GET InsurancePlan/{id}`. - `sold_to` (`sold-to`): `individuals` for the plans a person can buy on their own, or `employer-groups` for the plans sold only to employer and union groups (Medicare Advantage) or to small employers (Marketplace SHOP plans). Narrows a search; it is not one by itself. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-sold-to`). - `count` (`_count`): Page size. A larger value is refused rather than quietly reduced. - `page`: The cursor a `next` link carries. It is opaque and belongs to one search; once the plans are updated a later page answers `410`, so start the search again. @@ -857,6 +968,7 @@ def search_insurance_plan( ("coverage-area-state", coverage_area_state), ("coverage-area-county", coverage_area_county), ("type", type), + ("_id", id), ("sold-to", sold_to), ("_count", count), ("page", page), @@ -927,6 +1039,47 @@ def search_location( Options(timeout, max_retries, correlation_id, extra_headers), ).data + def search_medication_knowledge( + self, + *, + code: str | None = None, + drug_name: str | None = None, + id: str | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Bundle: + """Find drugs any Part D formulary lists + + Search the drugs the Medicare Part D formularies in CMS's monthly file list, each as the FormularyDrug of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `MedicationKnowledge`): its RxNorm code and name, then each dose form group RxNorm puts it in, named from haau3's RxNorm release. A search needs `code`, `drug-name` or `_id`. `code` matches a drug's own code or one of its groups', and `drug-name` the start of either's name. To find the formularies a drug is on, search `Basic` by `subject`. + + `GET /v1/fhir/r4/MedicationKnowledge`, https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-any-part-d-formulary-lists + + Query parameters, each with its name in the API: + + - `code`: An RxNorm code, bare or as `http://www.nlm.nih.gov/research/umls/rxnorm|311354`, several separated by commas, up to 20. It matches a drug's own code or one of its dose form groups', so a group's code finds every drug in it. + - `drug_name` (`drug-name`): The start of RxNorm's name for the drug or one of its dose form groups, ignoring case: `lisinopril 5`. 1 to 100 characters. + - `id` (`_id`): A drug's id, `FormularyDrug-311354`, several separated by commas, up to 20. + - `count` (`_count`): Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced. + - `page`: The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again. + """ + return self._engine.call( + SEARCH_MEDICATION_KNOWLEDGE, + (), + ( + ("code", code), + ("drug-name", drug_name), + ("_id", id), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ).data + def search_organization( self, *, @@ -969,29 +1122,33 @@ def search_organization( ) -> fhir.Bundle: """Find organizations, payers and networks - Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; any other type, `active` and the address parameters narrow a search but cannot stand alone. + Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; `type=pharmacy` searches pharmacies' organizations, below; any other type, `active` and the address parameters narrow a search of the directory but cannot stand alone. The directory records networks by the text of their type rather than a code. This service searches that text for `type=ntwk` and confirms every answer is a network; if the directory changes how it records them, the search answers 502 rather than serve something else. An NPI search can return a parent organization beside the practice, when the parent lists the NPI among several. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match, up to 100 per page. + **Pharmacies' organizations**: `type=pharmacy`, HL7's organization type, bare or as `http://terminology.hl7.org/CodeSystem/organization-type|pharmacy`, finds pharmacies' organizations, from the same records as a pharmacy search on `HealthcareService`: each match is `Organization-pharmacy-{NPI}`, the record a read of that id returns. It needs any one of: `address-postalcode` (a ZIP code or its first two or more digits), `address-state`, `name` or `identifier`; `address-city` narrows a search by state. An address matches the pharmacy's store only, never a mailing or billing address, and a name matches its name or a name it does business as. Without `active`, active and deactivated pharmacies are both returned, each marked. `partof`, `_id`, `_include` and `_revinclude` are refused on it: for a pharmacy's service and store, search `HealthcareService?service-category=pharm` with `_include=HealthcareService:organization` and `_include=HealthcareService:location`. + + Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. + A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. `GET /v1/fhir/r4/Organization`, https://docs.haau3.com/api-reference/provider-directory/find-organizations-payers-and-networks Query parameters, each with its name in the API: - - `name`: Matches the organization's name. - - `identifier`: An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. - - `partof`: The organizations that are part of one organization. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - - `type`: An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`). - - `active`: `true` or `false`. Narrows a search; cannot be used on its own. - - `address_city` (`address-city`): Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. - - `address_state` (`address-state`): Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. - - `address_postalcode` (`address-postalcode`): Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. - - `include` (`_include`): `Organization:partof` brings the organization each match is part of. Repeat the parameter to include several. Included entries do not count toward `_count`. - - `revinclude` (`_revinclude`): Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short. - - `id` (`_id`): A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. + - `name`: Matches the organization's name. On a pharmacy search (`type=pharmacy`), two or more letters of the start of the pharmacy's name or a name it does business as. + - `identifier`: An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. On a pharmacy search (`type=pharmacy`), the one pharmacy that holds the NPI. + - `partof`: The organizations that are part of one organization. Refused on a pharmacy search, whose organizations name a parent by its name alone. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. + - `type`: An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks, `pharmacy` for pharmacies. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; `type=pharmacy` starts a pharmacy search, which needs a place, a name or an NPI beside it; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`), and their organizations with `type=pharmacy`. + - `active`: `true` or `false`. Narrows a search; cannot be used on its own. On a pharmacy search, `true` keeps the pharmacies NPPES lists as active and `false` the ones it lists as deactivated since its November 2026 monthly file; without it, both are returned, each marked by `active`. + - `address_city` (`address-city`): Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. On a pharmacy search, two or more letters of the start of the store's city, beside `address-state`. + - `address_state` (`address-state`): Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. On a pharmacy search, the two-letter code of the store's state; it stands alone there. + - `address_postalcode` (`address-postalcode`): Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. On a pharmacy search, a ZIP code, ZIP+4, or its first two or more digits, matched against the store's address only; it stands alone there. + - `include` (`_include`): `Organization:partof` brings the organization each match is part of. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`. + - `revinclude` (`_revinclude`): Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short. + - `id` (`_id`): A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. Refused on a pharmacy search (`type=pharmacy`): read the pharmacy's organization by its id, or find it with `identifier`. - `summary` (`_summary`): `count` only: answers how many records match, as `total`, with no entries. Cannot be combined with `_include`, `_revinclude`, `_count` or `page`. - `count` (`_count`): Results are paged. `_count` sets the page size (1 to 100); a larger value is refused rather than quietly reduced. Follow `link` with relation `next` to continue. The cursor it carries is opaque and must not be constructed or modified. - `page`: Continuation cursor. Opaque: follow the `next` link from a previous response, and never construct or modify it. Cursors expire. @@ -1757,6 +1914,15 @@ def value_set_validate_code_post( VALUE_SET_VALIDATE_CODE_POST, (), (), hidden, Options(timeout, max_retries, correlation_id, extra_headers) ).data + @overload + def resolve( + self, + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["Basic"], + from_: fhir.Resource | None = None, + ) -> fhir.Basic | None: ... @overload def resolve( self, @@ -1839,6 +2005,15 @@ def resolve( from_: fhir.Resource | None = None, ) -> fhir.Medication | None: ... @overload + def resolve( + self, + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["MedicationKnowledge"], + from_: fhir.Resource | None = None, + ) -> fhir.MedicationKnowledge | None: ... + @overload def resolve( self, bundle: fhir.Bundle, @@ -1987,7 +2162,6 @@ def resolve( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -2048,7 +2222,6 @@ def resolve( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", @@ -2139,6 +2312,8 @@ def resolve( """ return resolve_in(bundle, reference, type=type, from_=from_) + @overload + def matches(self, page: fhir.Bundle, type: Literal["Basic"]) -> list[fhir.Basic]: ... @overload def matches(self, page: fhir.Bundle, type: Literal["Bundle"]) -> list[fhir.Bundle]: ... @overload @@ -2158,6 +2333,8 @@ def matches(self, page: fhir.Bundle, type: Literal["Location"]) -> list[fhir.Loc @overload def matches(self, page: fhir.Bundle, type: Literal["Medication"]) -> list[fhir.Medication]: ... @overload + def matches(self, page: fhir.Bundle, type: Literal["MedicationKnowledge"]) -> list[fhir.MedicationKnowledge]: ... + @overload def matches(self, page: fhir.Bundle, type: Literal["MedicationRequest"]) -> list[fhir.MedicationRequest]: ... @overload def matches(self, page: fhir.Bundle, type: Literal["MedicationStatement"]) -> list[fhir.MedicationStatement]: ... @@ -2203,7 +2380,6 @@ def matches( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -2264,7 +2440,6 @@ def matches( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", @@ -2763,6 +2938,28 @@ async def process_message( ) ).data + async def read_basic( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Basic: + """Read a drug on a Part D formulary + + Read one item of a Medicare Part D formulary by its id, `FormularyItem-` followed by CMS's formulary id and the drug's RxNorm code: `FormularyItem-00027002-311354`. So a caller holding a formulary and an RxNorm code reads the item with no search. A drug not on the formulary answers `404`, saying so with the month of CMS's file. + + `GET /v1/fhir/r4/Basic/{id}`, https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-on-a-part-d-formulary + """ + return ( + await self._engine.call( + READ_BASIC, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + ).data + async def read_endpoint( self, id: str, @@ -2821,7 +3018,11 @@ async def read_insurance_plan( ) -> fhir.InsurancePlan: """Read a plan - Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from. + Read one plan by its id. A Medicare Advantage plan's id is CMS's plan id with the segment in three digits (`H2406-013-000`); a Marketplace plan's is its HIOS plan id with the variant (`19898FL0340001-01`). The plan conforms to the haau3 Medical Benefits profile and to the SBC InsurancePlan profile of the CARIN Digital Insurance Card guide, 2.0.0-ballot, and names the CMS release it was read from. A Medicare Advantage plan with Part D names its Part D formulary on its coverage, in Da Vinci's FormularyReference extension; when the formulary could not be read, the plan is answered without it and tagged `SUBSETTED`. + + A Medicare Part D formulary is read here too, by its id: `Formulary-00027002`, as the Formulary of HL7's Da Vinci US Drug Formulary guide, 2.1.0, from CMS's monthly file. A formulary read is counted as Pharmacy Benefits. + + So is a Medicare Part D plan's drug plan, by the plan's id after `DrugPlan-`: `DrugPlan-H2406-013-000`. It is an InsurancePlan of its own, beside the plan's medical one, as the PayerInsurancePlan of the same Da Vinci guide: the plan's formulary, its pharmacy networks, its deductible, and what each tier costs for each way to fill a prescription, from CMS's monthly file. The costs are those of the initial coverage phase for a person with no subsidy, each a copay in dollars or a coinsurance in percent, with a qualifier saying whether the plan's deductible comes first; they may not be what a member pays at the pharmacy. A way to fill the guide's codes do not name, a two-month supply or a pharmacy the plan lists as preferred, carries one of eight interim codes (`https://fhir.haau3.com/platform/CodeSystem/part-d-pharmacy-benefit-type`), and a cost the file gives with a minimum or a maximum carries them in the extension `https://fhir.haau3.com/platform/StructureDefinition/part-d-cost-range`. Every plan in CMS's monthly Part D file has a drug plan, a stand-alone drug plan included, which has no medical InsurancePlan; the file leaves out employer plans. No search finds a drug plan. A drug plan read is counted as Pharmacy Benefits. `GET /v1/fhir/r4/InsurancePlan/{id}`, https://docs.haau3.com/api-reference/medical-benefits/read-a-plan """ @@ -2855,6 +3056,28 @@ async def read_location( ) ).data + async def read_medication_knowledge( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.MedicationKnowledge: + """Read a drug a Part D formulary lists + + Read one drug by its id, `FormularyDrug-` followed by its RxNorm code: `FormularyDrug-311354`. A drug no Part D formulary lists answers `404`. + + `GET /v1/fhir/r4/MedicationKnowledge/{id}`, https://docs.haau3.com/api-reference/pharmacy-benefits/read-a-drug-a-part-d-formulary-lists + """ + return ( + await self._engine.call( + READ_MEDICATION_KNOWLEDGE, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + ).data + async def read_organization( self, id: str, @@ -2867,7 +3090,7 @@ async def read_organization( ) -> fhir.Organization: """Read an Organization - Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search on `HealthcareService`) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. + Read one organization, payer or network by id, as returned by a search on this service. A pharmacy's organization (`Organization-pharmacy-{NPI}`, from a pharmacy search) is read back from the same records as a pharmacy search, a deactivated pharmacy marked `active: false`; `Organization-{NPI}` is the directory's own record. A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. `GET /v1/fhir/r4/Organization/{id}`, https://docs.haau3.com/api-reference/provider-directory/read-an-organization """ @@ -3116,6 +3339,62 @@ async def sandbox_process_message( ) ).data + async def search_basic( + self, + *, + formulary: str | None = None, + subject: str | None = None, + drug_tier: str | None = None, + pharmacy_benefit_type: str | None = None, + id: str | None = None, + include: Literal["Basic:formulary", "Basic:subject"] + | Sequence[Literal["Basic:formulary", "Basic:subject"]] + | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Bundle: + """Find drugs on a Part D formulary + + Search the items of the Medicare Part D formularies in CMS's monthly file: each a drug on one formulary, as the FormularyItem of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `Basic`). An item states the drug's tier (`1` to `6`, from `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier`), whether it needs prior authorization or step therapy, its quantity limit, and the ways to fill it that every plan on the formulary prices, and names the month of CMS's file in the `https://fhir.haau3.com/platform/StructureDefinition/part-d-data-month` extension. A search needs `formulary`, `subject` or `_id`; `drug-tier` and `pharmacy-benefit-type` narrow it. `_include=Basic:formulary` adds each item's formulary and `_include=Basic:subject` its drug; `total` counts the items only. + + A search that finds no item answers `200` with an `OperationOutcome` entry saying so, with the month of CMS's file: a drug not on a formulary is an answer. A formulary that does not exist is refused by name. A formulary lists what a plan covers; it is not a statement of what a member will pay or be given. Follow the `next` link to continue: its cursor belongs to the one search, and answers `410` once a newer month is served. + + `GET /v1/fhir/r4/Basic`, https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-on-a-part-d-formulary + + Query parameters, each with its name in the API: + + - `formulary`: The formulary an item is on: `InsurancePlan/Formulary-00027002` or `Formulary-00027002`, several separated by commas, up to 20. A formulary that does not exist is refused by name. + - `subject`: The drug: `MedicationKnowledge/FormularyDrug-311354` or `FormularyDrug-311354`, its RxNorm code after `FormularyDrug-`, several separated by commas, up to 20. A search that names a drug and a formulary and finds no item says so in an `OperationOutcome` entry, with the month of CMS's file. + - `drug_tier` (`drug-tier`): The Part D tier, `1` to `6`, bare or as `https://fhir.haau3.com/platform/CodeSystem/part-d-drug-tier|1`, several separated by commas, up to 20. Narrows a search; it is not one by itself. + - `pharmacy_benefit_type` (`pharmacy-benefit-type`): A way to fill the drug that every plan on the formulary prices: `1-month-in-retail`, `1-month-in-mail`, `3-month-in-retail`, `3-month-in-mail`, bare or with the system of HL7's Da Vinci US Drug Formulary guide, several separated by commas, up to 20. Narrows a search; it is not one by itself. + - `id` (`_id`): An item's id, `FormularyItem-00027002-311354`, several separated by commas, up to 20. + - `include` (`_include`): `Basic:formulary` adds each item's formulary (an InsurancePlan) and `Basic:subject` its drug (a MedicationKnowledge). Send both to have both. Included resources do not count toward `_count`. + - `count` (`_count`): Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced. + - `page`: The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again. + """ + return ( + await self._engine.call( + SEARCH_BASIC, + (), + ( + ("formulary", formulary), + ("subject", subject), + ("drug-tier", drug_tier), + ("pharmacy-benefit-type", pharmacy_benefit_type), + ("_id", id), + ("_include", include), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + ).data + async def search_endpoint( self, *, @@ -3181,6 +3460,7 @@ async def search_healthcare_service( location_address_state: str | None = None, location_address_postalcode: str | None = None, location_address_city: str | None = None, + location_near: str | None = None, name: str | None = None, organization: str | None = None, organization_identifier: str | None = None, @@ -3203,9 +3483,9 @@ async def search_healthcare_service( **The directory's services**, by location, or by network beside a location. The directory's service records name a network and, for a few, a location; none names an organization, so `organization` is refused on this search rather than answered with nothing. - **Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle. + **Pharmacies**, modelled as NDH 2.0.0 models them: each match is a pharmacy service, with category `pharm` and its NUCC pharmacy codes as `specialty`, provided by an organization at a store. Start the search with `service-category=pharm` (every kind) or `specialty` (one kind or several, separated by commas). A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. Add `_include=HealthcareService:organization` and `_include=HealthcareService:location` to get each pharmacy's organization (its NPI) and store (its address) in the same bundle. - Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly, until CMS's National Provider Directory serves them. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if the search moved to the directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy. + A pharmacy search that sends `location.near`, or a five-digit ZIP code or ZIP+4 in `location.address-postalcode`, comes nearest first: from the point sent, or from the ZIP code area's internal point as the U.S. Census Bureau publishes it. Each match carries its straight-line distance in `search.extension`, HL7's `location-distance` (`http://hl7.org/fhir/StructureDefinition/location-distance`), in the unit `location.near` asked for and otherwise in kilometres, and ties go by NPI. A store's point is in `Location.position`, from the U.S. Census Bureau's geocoder, which places an address along its street's range of numbers. A store it could not place has no `position` and is measured from its own ZIP code area's point instead, its distance marked approximate by haau3's `location-distance-approximate` extension (`https://fhir.haau3.com/platform/StructureDefinition/location-distance-approximate`, `true`); a point search includes it when that point is within its distance. Every store at its own point comes first, then every one measured from its ZIP code area's point, each nearest first, then every one with neither, with no distance, which a point search leaves out. A search by a ZIP code's first digits, or by a ZIP code the Census Bureau gives no area, is not measured: it comes in the order below, and its bundle says so in an `OperationOutcome` entry. Any other pharmacy search comes in one fixed order, the pharmacy's name ignoring case and then its NPI. Every order is the same on every page, the searchset carries `total`, and a continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. One store can bill under more than one NPI, and each is served as its own pharmacy. **A Medicare Part D plan's pharmacies**: add `network` to a pharmacy search. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Every pharmacy's service carries haau3's Part D Listing extension (`https://fhir.haau3.com/platform/StructureDefinition/part-d-listing`): `listed`, whether any Medicare Part D plan's pharmacy list names it; `asOf`, the month CMS's Part D file covers; and `contractYear`, the year that file's plans are for, which from October is the coming year. In a search narrowed by `network`, each pharmacy also names every one of that plan's networks that lists it, in NDH's Network Reference extension, so a search of a plan's retail network shows which pharmacies it prefers. CMS publishes the files monthly, and a plan can change its list from one month to the next. A list names retail and mail order pharmacies only, and can name an organization NPPES does not class as a pharmacy, which no pharmacy search returns: `InsurancePlan/{id}/$in-network` answers for one by its NPI. If the Part D files cannot be read, a search with no `network` still answers, without the extension, and its bundle says so in an `OperationOutcome` entry. @@ -3215,11 +3495,12 @@ async def search_healthcare_service( - `location`: The services offered at one location. Give a Location id, `Location/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - `network`: The services in one insurance network, one network a search. On the directory's own search, the services the directory lists in the network; there it cannot be used on its own, so send it beside `location`. On a pharmacy search, the pharmacies one of a Medicare Part D plan's networks lists. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - - `service_category` (`service-category`): `pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. - - `specialty`: A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. + - `service_category` (`service-category`): `pharm`, bare or as `http://terminology.hl7.org/CodeSystem/ndh-healthcare-service-category|pharm`: every pharmacy, of any kind. Starts a pharmacy search, as `specialty` does. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. + - `specialty`: A NUCC pharmacy code, bare or as `http://nucc.org/provider-taxonomy|{code}`, or several separated by commas to find pharmacies of any of those kinds: for example `3336C0003X` (community or retail) or `3336M0002X` (mail order). Starts a pharmacy search. A pharmacy may carry only the general code 333600000X or only a specific one, so send `333600000X,3336C0003X` to find either, or `service-category=pharm` for every kind. Only pharmacy codes (333600000X, 3336C0002X, 3336C0003X, 3336C0004X, 3336H0001X, 3336I0012X, 3336L0003X, 3336M0002X, 3336M0003X, 3336N0007X, 3336S0011X, 332000000X, 332100000X, 332800000X) are served. A pharmacy search needs any one of: `location.near` (a point), `location.address-postalcode` (a ZIP code or its first two or more digits), `location.address-state`, `name`, one pharmacy's `organization` or `organization.identifier`, or a Medicare Part D plan's mail order `network`. `location.address-city` narrows a search by state, and a retail `network` narrows a search by place or name. - `location_address_state` (`location.address-state`): A pharmacy search's state: the two-letter code of the state the pharmacy's store is in. Stands alone on a pharmacy search, and is required beside `location.address-city`. - `location_address_postalcode` (`location.address-postalcode`): Finds the pharmacies whose store's ZIP code starts with this: a ZIP code, ZIP+4, or its first two or more digits. Stands alone on a pharmacy search. - `location_address_city` (`location.address-city`): Narrows a pharmacy search to stores in a city whose name starts with this, so `Miami` also finds Miami Beach. Two or more letters. Send it with `location.address-state`. + - `location_near` (`location.near`): Finds pharmacies near a point, nearest first: FHIR's `near` on the pharmacy's store, as `[latitude]|[longitude]|[distance]|[units]`, in decimal degrees (WGS84), for example `25.7743|-80.1937|5|[mi_us]`. Only pharmacies within that straight-line distance are returned, nearest first. `distance` is at most 50 miles (80.46 km), and without it a point search reaches 50 miles. `units` is `km` (the default) or `[mi_us]` for miles, and each match's distance comes back in the same unit. One point per search. Stands alone on a pharmacy search, and narrows any other. - `name`: Finds the pharmacies whose name, or a name they do business as, starts with this. Two or more letters. Stands alone on a pharmacy search. - `organization`: One pharmacy: the organization that provides it, as a pharmacy search returned it (`Organization-pharmacy-{NPI}`). Stands alone on a pharmacy search. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - `organization_identifier` (`organization.identifier`): One pharmacy by its NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Organization` accepts. Stands alone on a pharmacy search. @@ -3242,6 +3523,7 @@ async def search_healthcare_service( ("location.address-state", location_address_state), ("location.address-postalcode", location_address_postalcode), ("location.address-city", location_address_city), + ("location.near", location_near), ("name", name), ("organization", organization), ("organization.identifier", organization_identifier), @@ -3267,6 +3549,7 @@ async def search_insurance_plan( coverage_area_state: str | None = None, coverage_area_county: str | None = None, type: str | None = None, + id: str | None = None, sold_to: Literal["individuals", "employer-groups"] | None = None, count: int | None = None, page: str | None = None, @@ -3283,19 +3566,24 @@ async def search_insurance_plan( Every other parameter is refused by name rather than ignored, so a search never quietly answers a different question than the one asked. `address-state` and `address-postalcode` are refused with a pointer to the coverage-area parameters, because in FHIR R4 they search a plan's contact address. - Drug-only and dental-only plans are not served. An identifier search that finds one answers no plan and an `OperationOutcome` entry saying why. + A stand-alone drug plan and a dental-only plan are not medical plans, and no search finds one. An identifier search that matches one answers no plan and an `OperationOutcome` entry saying why. For a stand-alone drug plan in CMS's Part D file the entry names its drug plan's id (`DrugPlan-S5743-001-000`), which `GET /v1/fhir/r4/InsurancePlan/{id}` reads. + + A Medicare Advantage plan with Part D names its Part D formulary on its coverage, in the FormularyReference extension of HL7's Da Vinci US Drug Formulary guide. When the formulary could not be read, the plans are answered without it and an `OperationOutcome` entry says so. + + `type=DRUGPOL` finds Medicare Part D formularies instead of plans, each as Da Vinci's Formulary, from CMS's monthly file: by `identifier` (CMS's formulary id, `00027002`), a form of `name` or `_id`, or alone for every formulary, in order of id. It refuses the parameters that find plans by where they are sold or to whom. A formulary search is counted as Pharmacy Benefits. `GET /v1/fhir/r4/InsurancePlan`, https://docs.haau3.com/api-reference/medical-benefits/find-a-plan Query parameters, each with its name in the API: - - `identifier`: A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant. - - `name`: The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form. + - `identifier`: A plan id, as `value` or `system|value`. A Medicare Advantage plan by CMS's plan id (`http://cms.gov/medicare/ma-plan-id`, the segment in three digits: `H2406-013-000`) or its bid_id (`https://haau3.com/fhir/NamingSystem/cms-ma-bid-id`: `H2406_013_0`). A Marketplace plan by its HIOS plan id (`https://haau3.com/fhir/NamingSystem/hios-plan-id`: `19898FL0340001-01`) or its standard component (`https://haau3.com/fhir/NamingSystem/hios-standard-component-id`: `19898FL0340001`), which finds every variant. With `type=DRUGPOL`, a Medicare Part D formulary by CMS's formulary id, which has no system: `00027002`. + - `name`: The start of the plan's name, ignoring case and accents. `name:contains` matches anywhere in the name and `name:exact` the whole name exactly; give one form. With `type=DRUGPOL`, the formulary's name. - `name_contains` (`name:contains`): Part of the plan's name, anywhere in it, ignoring case and accents. - `name_exact` (`name:exact`): The plan's whole name, exactly. - `coverage_area_state` (`coverage-area-state`): A two-letter state code: the plans sold in that state. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-coverage-area-state`). - `coverage_area_county` (`coverage-area-county`): A five-digit FIPS state and county code (`12086`, Miami-Dade County, Florida), bare or as `http://terminology.hl7.org/CodeSystem/FIPS64|12086`: the plans sold in that county, in whole or in part. A code that names no county is refused. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-coverage-area-county`). - - `type`: `mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`. + - `type`: `mediadv` for Medicare Advantage or `qhp` for the Marketplace, from `http://terminology.hl7.org/CodeSystem/insurance-product-type`. `DRUGPOL`, from `http://terminology.hl7.org/CodeSystem/v3-ActCode`, finds Medicare Part D formularies instead of plans, and is a search by itself: it takes `identifier`, a form of `name` and `_id`, and refuses the parameters that find plans by where they are sold or to whom. + - `id` (`_id`): With `type=DRUGPOL`, a formulary's id, `Formulary-00027002`, several separated by commas. A plan is read by its id instead: `GET InsurancePlan/{id}`. - `sold_to` (`sold-to`): `individuals` for the plans a person can buy on their own, or `employer-groups` for the plans sold only to employer and union groups (Medicare Advantage) or to small employers (Marketplace SHOP plans). Narrows a search; it is not one by itself. Defined by the haau3 implementation guide (`https://haau3.com/fhir/SearchParameter/InsurancePlan-sold-to`). - `count` (`_count`): Page size. A larger value is refused rather than quietly reduced. - `page`: The cursor a `next` link carries. It is opaque and belongs to one search; once the plans are updated a later page answers `410`, so start the search again. @@ -3312,6 +3600,7 @@ async def search_insurance_plan( ("coverage-area-state", coverage_area_state), ("coverage-area-county", coverage_area_county), ("type", type), + ("_id", id), ("sold-to", sold_to), ("_count", count), ("page", page), @@ -3385,6 +3674,49 @@ async def search_location( ) ).data + async def search_medication_knowledge( + self, + *, + code: str | None = None, + drug_name: str | None = None, + id: str | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> fhir.Bundle: + """Find drugs any Part D formulary lists + + Search the drugs the Medicare Part D formularies in CMS's monthly file list, each as the FormularyDrug of HL7's Da Vinci US Drug Formulary guide, 2.1.0 (a `MedicationKnowledge`): its RxNorm code and name, then each dose form group RxNorm puts it in, named from haau3's RxNorm release. A search needs `code`, `drug-name` or `_id`. `code` matches a drug's own code or one of its groups', and `drug-name` the start of either's name. To find the formularies a drug is on, search `Basic` by `subject`. + + `GET /v1/fhir/r4/MedicationKnowledge`, https://docs.haau3.com/api-reference/pharmacy-benefits/find-drugs-any-part-d-formulary-lists + + Query parameters, each with its name in the API: + + - `code`: An RxNorm code, bare or as `http://www.nlm.nih.gov/research/umls/rxnorm|311354`, several separated by commas, up to 20. It matches a drug's own code or one of its dose form groups', so a group's code finds every drug in it. + - `drug_name` (`drug-name`): The start of RxNorm's name for the drug or one of its dose form groups, ignoring case: `lisinopril 5`. 1 to 100 characters. + - `id` (`_id`): A drug's id, `FormularyDrug-311354`, several separated by commas, up to 20. + - `count` (`_count`): Page size, 1 to 100, 25 by default. A larger value is refused rather than quietly reduced. + - `page`: The next page's cursor, from the `next` link of the page before. It is opaque and belongs to the one search; once a newer month of CMS's file is served, a later page answers `410`, so start the search again. + """ + return ( + await self._engine.call( + SEARCH_MEDICATION_KNOWLEDGE, + (), + ( + ("code", code), + ("drug-name", drug_name), + ("_id", id), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + ).data + async def search_organization( self, *, @@ -3427,29 +3759,33 @@ async def search_organization( ) -> fhir.Bundle: """Find organizations, payers and networks - Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; any other type, `active` and the address parameters narrow a search but cannot stand alone. + Search `Organization` by name, NPI, parent (`partof`) or type. `type=ntwk` lists the insurance networks the directory holds and `type=pay` its payers; `type=pharmacy` searches pharmacies' organizations, below; any other type, `active` and the address parameters narrow a search of the directory but cannot stand alone. The directory records networks by the text of their type rather than a code. This service searches that text for `type=ntwk` and confirms every answer is a network; if the directory changes how it records them, the search answers 502 rather than serve something else. An NPI search can return a parent organization beside the practice, when the parent lists the NPI among several. `_revinclude` brings the roles, affiliations, locations and endpoints that point at each match, up to 100 per page. + **Pharmacies' organizations**: `type=pharmacy`, HL7's organization type, bare or as `http://terminology.hl7.org/CodeSystem/organization-type|pharmacy`, finds pharmacies' organizations, from the same records as a pharmacy search on `HealthcareService`: each match is `Organization-pharmacy-{NPI}`, the record a read of that id returns. It needs any one of: `address-postalcode` (a ZIP code or its first two or more digits), `address-state`, `name` or `identifier`; `address-city` narrows a search by state. An address matches the pharmacy's store only, never a mailing or billing address, and a name matches its name or a name it does business as. Without `active`, active and deactivated pharmacies are both returned, each marked. `partof`, `_id`, `_include` and `_revinclude` are refused on it: for a pharmacy's service and store, search `HealthcareService?service-category=pharm` with `_include=HealthcareService:organization` and `_include=HealthcareService:location`. + + Results come in one fixed order, the pharmacy's name ignoring case and then its NPI, the same on every page, and the searchset carries `total`. A continuation goes on in that order from the last pharmacy shown, so the weekly update does not cut a search short. Pharmacies come from NPPES, CMS's NPI Registry, through CMS's monthly and weekly files, updated weekly. Each resource's `meta.source` names the CMS file its record came from, which may no longer open once CMS removes it, and its `lastSourceSync` extension on `meta` the last day of NPPES data the answer holds. Each pharmacy is found and served at its primary practice address. A pharmacy's three ids, its service's, its organization's (`Organization-pharmacy-{NPI}`) and its store's, are read back from the same records, so a search and a read return the same record; they would change if pharmacies were ever served from CMS's National Provider Directory. `Organization-{NPI}` is the directory's own record of an organization. A pharmacy NPPES lists as deactivated is served marked `active: false`, with its deactivation date, if it was deactivated since NPPES's November 2026 monthly file, and `active=true` asks for active pharmacies only. A pharmacy's ids are read by id; the directory's own searches refuse them. + A Medicare Part D plan's pharmacy networks are read by id, and no `Organization` search lists them: `type=ntwk` lists the directory's own networks. A Part D plan names up to four networks, one for each kind of pharmacy CMS's Part D files flag: `retail`, `mail-order`, `preferred-retail`, `preferred-mail-order`. A network's id is `Organization-part-d-{plan}-{kind}`, with the plan's id as `InsurancePlan` serves it: `Organization-part-d-H2406-013-000-preferred-retail`. A mail order network may be a pharmacy search's only criterion; a retail network narrows a search by place or name. A read answers an `Organization` typed `ntwk`, named for the plan and the kind, with its contract's name in `partOf` as CMS's file writes it, the contract year as HL7's organization-period extension, the CMS file in `meta.source` and the last day it covers in the `lastSourceSync` extension on `meta`. A plan CMS's file for the month does not hold, and a kind the plan lists no pharmacy of, each answer 404 and say which. The directory's own searches refuse a Part D network's id. `GET /v1/fhir/r4/Organization`, https://docs.haau3.com/api-reference/provider-directory/find-organizations-payers-and-networks Query parameters, each with its name in the API: - - `name`: Matches the organization's name. - - `identifier`: An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. - - `partof`: The organizations that are part of one organization. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. - - `type`: An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`). - - `active`: `true` or `false`. Narrows a search; cannot be used on its own. - - `address_city` (`address-city`): Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. - - `address_state` (`address-state`): Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. - - `address_postalcode` (`address-postalcode`): Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. - - `include` (`_include`): `Organization:partof` brings the organization each match is part of. Repeat the parameter to include several. Included entries do not count toward `_count`. - - `revinclude` (`_revinclude`): Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short. - - `id` (`_id`): A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. + - `name`: Matches the organization's name. On a pharmacy search (`type=pharmacy`), two or more letters of the start of the pharmacy's name or a name it does business as. + - `identifier`: An organization's NPI, as `{system}|{npi}` or a bare 10-digit value, under the same systems `Practitioner` accepts. An NPI search can return more than the practice that holds the NPI: a parent organization that lists it among several NPIs is a match too, because it carries the NPI as an NPI. On a pharmacy search (`type=pharmacy`), the one pharmacy that holds the NPI. + - `partof`: The organizations that are part of one organization. Refused on a pharmacy search, whose organizations name a parent by its name alone. Give a Organization id, `Organization/{id}`, or the `fullUrl` this service returned. An address on another server is refused. + - `type`: An organization type from `http://terminology.hl7.org/CodeSystem/organization-type`, bare or with that system: `prov` for healthcare providers, `pay` for payers, `ntwk` for insurance networks, `pharmacy` for pharmacies. `ntwk` is also accepted under Plan-Net's `http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS`. `type=ntwk` and `type=pay` may stand alone, to list every network or every payer; `type=pharmacy` starts a pharmacy search, which needs a place, a name or an NPI beside it; any other type narrows a search. The directory records networks by the text of their type rather than a code; this service searches that text and confirms each answer is a network, and answers 502 rather than serve one that is not. A NUCC provider taxonomy code is refused: the directory's organizations carry none, and pharmacies are searched as `HealthcareService` (`service-category=pharm`), and their organizations with `type=pharmacy`. + - `active`: `true` or `false`. Narrows a search; cannot be used on its own. On a pharmacy search, `true` keeps the pharmacies NPPES lists as active and `false` the ones it lists as deactivated since its November 2026 monthly file; without it, both are returned, each marked by `active`. + - `address_city` (`address-city`): Narrows a search by city; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another city. On a pharmacy search, two or more letters of the start of the store's city, beside `address-state`. + - `address_state` (`address-state`): Narrows a search by state; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another state. On a pharmacy search, the two-letter code of the store's state; it stands alone there. + - `address_postalcode` (`address-postalcode`): Narrows a search by postal code; cannot be used on its own. Matches any of the organization's addresses, so a result can still list addresses in another postal code. On a pharmacy search, a ZIP code, ZIP+4, or its first two or more digits, matched against the store's address only; it stands alone there. + - `include` (`_include`): `Organization:partof` brings the organization each match is part of. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`. + - `revinclude` (`_revinclude`): Bring the records that point at each match: `PractitionerRole:organization`, `OrganizationAffiliation:primary-organization`, `OrganizationAffiliation:participating-organization`, `Location:organization`, `Endpoint:organization` or `Organization:partof`. Refused on a pharmacy search. Repeat the parameter to include several. Included entries do not count toward `_count`. The directory returns at most 100 included records per page; a page with more is refused with a 502 rather than served short. + - `id` (`_id`): A Organization id. Searching by id rather than reading it lets one request also bring the records an `_include` or `_revinclude` names. Refused on a pharmacy search (`type=pharmacy`): read the pharmacy's organization by its id, or find it with `identifier`. - `summary` (`_summary`): `count` only: answers how many records match, as `total`, with no entries. Cannot be combined with `_include`, `_revinclude`, `_count` or `page`. - `count` (`_count`): Results are paged. `_count` sets the page size (1 to 100); a larger value is refused rather than quietly reduced. Follow `link` with relation `next` to continue. The cursor it carries is opaque and must not be constructed or modified. - `page`: Continuation cursor. Opaque: follow the `next` link from a previous response, and never construct or modify it. Cursors expire. @@ -4250,6 +4586,15 @@ async def value_set_validate_code_post( ) ).data + @overload + def resolve( + self, + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["Basic"], + from_: fhir.Resource | None = None, + ) -> fhir.Basic | None: ... @overload def resolve( self, @@ -4332,6 +4677,15 @@ def resolve( from_: fhir.Resource | None = None, ) -> fhir.Medication | None: ... @overload + def resolve( + self, + bundle: fhir.Bundle, + reference: fhir.Reference | str | None, + *, + type: Literal["MedicationKnowledge"], + from_: fhir.Resource | None = None, + ) -> fhir.MedicationKnowledge | None: ... + @overload def resolve( self, bundle: fhir.Bundle, @@ -4480,7 +4834,6 @@ def resolve( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -4541,7 +4894,6 @@ def resolve( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", @@ -4632,6 +4984,8 @@ def resolve( """ return resolve_in(bundle, reference, type=type, from_=from_) + @overload + def matches(self, page: fhir.Bundle, type: Literal["Basic"]) -> list[fhir.Basic]: ... @overload def matches(self, page: fhir.Bundle, type: Literal["Bundle"]) -> list[fhir.Bundle]: ... @overload @@ -4651,6 +5005,8 @@ def matches(self, page: fhir.Bundle, type: Literal["Location"]) -> list[fhir.Loc @overload def matches(self, page: fhir.Bundle, type: Literal["Medication"]) -> list[fhir.Medication]: ... @overload + def matches(self, page: fhir.Bundle, type: Literal["MedicationKnowledge"]) -> list[fhir.MedicationKnowledge]: ... + @overload def matches(self, page: fhir.Bundle, type: Literal["MedicationRequest"]) -> list[fhir.MedicationRequest]: ... @overload def matches(self, page: fhir.Bundle, type: Literal["MedicationStatement"]) -> list[fhir.MedicationStatement]: ... @@ -4696,7 +5052,6 @@ def matches( "Appointment", "AppointmentResponse", "AuditEvent", - "Basic", "Binary", "BiologicallyDerivedProduct", "BodyStructure", @@ -4757,7 +5112,6 @@ def matches( "Media", "MedicationAdministration", "MedicationDispense", - "MedicationKnowledge", "MedicinalProduct", "MedicinalProductAuthorization", "MedicinalProductContraindication", @@ -5160,6 +5514,21 @@ def process_message( PROCESS_MESSAGE, (), (), hidden, Options(timeout, max_retries, correlation_id, extra_headers, declared) ) + def read_basic( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Basic]: + """`Haau3.read_basic`, returning a `Response` with the request id and timing as well as the answer.""" + return self._engine.call( + READ_BASIC, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + def read_endpoint( self, id: str, @@ -5220,6 +5589,21 @@ def read_location( READ_LOCATION, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) ) + def read_medication_knowledge( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.MedicationKnowledge]: + """`Haau3.read_medication_knowledge`, returning a `Response` with the request id and timing as well as the answer.""" + return self._engine.call( + READ_MEDICATION_KNOWLEDGE, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + def read_organization( self, id: str, @@ -5397,6 +5781,42 @@ def sandbox_process_message( Options(timeout, max_retries, correlation_id, extra_headers, declared), ) + def search_basic( + self, + *, + formulary: str | None = None, + subject: str | None = None, + drug_tier: str | None = None, + pharmacy_benefit_type: str | None = None, + id: str | None = None, + include: Literal["Basic:formulary", "Basic:subject"] + | Sequence[Literal["Basic:formulary", "Basic:subject"]] + | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Bundle]: + """`Haau3.search_basic`, returning a `Response` with the request id and timing as well as the answer.""" + return self._engine.call( + SEARCH_BASIC, + (), + ( + ("formulary", formulary), + ("subject", subject), + ("drug-tier", drug_tier), + ("pharmacy-benefit-type", pharmacy_benefit_type), + ("_id", id), + ("_include", include), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + def search_endpoint( self, *, @@ -5443,6 +5863,7 @@ def search_healthcare_service( location_address_state: str | None = None, location_address_postalcode: str | None = None, location_address_city: str | None = None, + location_near: str | None = None, name: str | None = None, organization: str | None = None, organization_identifier: str | None = None, @@ -5471,6 +5892,7 @@ def search_healthcare_service( ("location.address-state", location_address_state), ("location.address-postalcode", location_address_postalcode), ("location.address-city", location_address_city), + ("location.near", location_near), ("name", name), ("organization", organization), ("organization.identifier", organization_identifier), @@ -5495,6 +5917,7 @@ def search_insurance_plan( coverage_area_state: str | None = None, coverage_area_county: str | None = None, type: str | None = None, + id: str | None = None, sold_to: Literal["individuals", "employer-groups"] | None = None, count: int | None = None, page: str | None = None, @@ -5515,6 +5938,7 @@ def search_insurance_plan( ("coverage-area-state", coverage_area_state), ("coverage-area-county", coverage_area_county), ("type", type), + ("_id", id), ("sold-to", sold_to), ("_count", count), ("page", page), @@ -5565,6 +5989,34 @@ def search_location( Options(timeout, max_retries, correlation_id, extra_headers), ) + def search_medication_knowledge( + self, + *, + code: str | None = None, + drug_name: str | None = None, + id: str | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Bundle]: + """`Haau3.search_medication_knowledge`, returning a `Response` with the request id and timing as well as the answer.""" + return self._engine.call( + SEARCH_MEDICATION_KNOWLEDGE, + (), + ( + ("code", code), + ("drug-name", drug_name), + ("_id", id), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + def search_organization( self, *, @@ -6434,6 +6886,21 @@ async def process_message( PROCESS_MESSAGE, (), (), hidden, Options(timeout, max_retries, correlation_id, extra_headers, declared) ) + async def read_basic( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Basic]: + """`AsyncHaau3.read_basic`, returning a `Response` with the request id and timing as well as the answer.""" + return await self._engine.call( + READ_BASIC, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + async def read_endpoint( self, id: str, @@ -6494,6 +6961,21 @@ async def read_location( READ_LOCATION, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) ) + async def read_medication_knowledge( + self, + id: str, + /, + *, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.MedicationKnowledge]: + """`AsyncHaau3.read_medication_knowledge`, returning a `Response` with the request id and timing as well as the answer.""" + return await self._engine.call( + READ_MEDICATION_KNOWLEDGE, (id,), (), None, Options(timeout, max_retries, correlation_id, extra_headers) + ) + async def read_organization( self, id: str, @@ -6671,6 +7153,42 @@ async def sandbox_process_message( Options(timeout, max_retries, correlation_id, extra_headers, declared), ) + async def search_basic( + self, + *, + formulary: str | None = None, + subject: str | None = None, + drug_tier: str | None = None, + pharmacy_benefit_type: str | None = None, + id: str | None = None, + include: Literal["Basic:formulary", "Basic:subject"] + | Sequence[Literal["Basic:formulary", "Basic:subject"]] + | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Bundle]: + """`AsyncHaau3.search_basic`, returning a `Response` with the request id and timing as well as the answer.""" + return await self._engine.call( + SEARCH_BASIC, + (), + ( + ("formulary", formulary), + ("subject", subject), + ("drug-tier", drug_tier), + ("pharmacy-benefit-type", pharmacy_benefit_type), + ("_id", id), + ("_include", include), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + async def search_endpoint( self, *, @@ -6717,6 +7235,7 @@ async def search_healthcare_service( location_address_state: str | None = None, location_address_postalcode: str | None = None, location_address_city: str | None = None, + location_near: str | None = None, name: str | None = None, organization: str | None = None, organization_identifier: str | None = None, @@ -6745,6 +7264,7 @@ async def search_healthcare_service( ("location.address-state", location_address_state), ("location.address-postalcode", location_address_postalcode), ("location.address-city", location_address_city), + ("location.near", location_near), ("name", name), ("organization", organization), ("organization.identifier", organization_identifier), @@ -6769,6 +7289,7 @@ async def search_insurance_plan( coverage_area_state: str | None = None, coverage_area_county: str | None = None, type: str | None = None, + id: str | None = None, sold_to: Literal["individuals", "employer-groups"] | None = None, count: int | None = None, page: str | None = None, @@ -6789,6 +7310,7 @@ async def search_insurance_plan( ("coverage-area-state", coverage_area_state), ("coverage-area-county", coverage_area_county), ("type", type), + ("_id", id), ("sold-to", sold_to), ("_count", count), ("page", page), @@ -6839,6 +7361,34 @@ async def search_location( Options(timeout, max_retries, correlation_id, extra_headers), ) + async def search_medication_knowledge( + self, + *, + code: str | None = None, + drug_name: str | None = None, + id: str | None = None, + count: int | None = None, + page: str | None = None, + timeout: float | None = None, + max_retries: int | None = None, + correlation_id: str | None = None, + extra_headers: Mapping[str, str] | None = None, + ) -> Response[fhir.Bundle]: + """`AsyncHaau3.search_medication_knowledge`, returning a `Response` with the request id and timing as well as the answer.""" + return await self._engine.call( + SEARCH_MEDICATION_KNOWLEDGE, + (), + ( + ("code", code), + ("drug-name", drug_name), + ("_id", id), + ("_count", count), + ("page", page), + ), + None, + Options(timeout, max_retries, correlation_id, extra_headers), + ) + async def search_organization( self, *, diff --git a/src/haau3/_operations.py b/src/haau3/_operations.py index 423ccc7..ef55ada 100644 --- a/src/haau3/_operations.py +++ b/src/haau3/_operations.py @@ -13,7 +13,7 @@ from . import fhir from ._operation import DeclaredHeader, Operation -SPEC_VERSION: Final[str] = "1.0.0-preview.45" +SPEC_VERSION: Final[str] = "1.0.0-preview.49" """The version of the API's spec this SDK was generated from.""" CHECK_INSURANCE_PLAN_NETWORK: Final[Operation[fhir.Parameters]] = Operation( @@ -53,6 +53,7 @@ ), ), ) +READ_BASIC: Final[Operation[fhir.Basic]] = Operation("GET", "/v1/fhir/r4/Basic/{id}", ("Basic",)) READ_ENDPOINT: Final[Operation[fhir.Endpoint]] = Operation("GET", "/v1/fhir/r4/Endpoint/{id}", ("Endpoint",)) READ_HEALTHCARE_SERVICE: Final[Operation[fhir.HealthcareService]] = Operation( "GET", "/v1/fhir/r4/HealthcareService/{id}", ("HealthcareService",) @@ -61,6 +62,9 @@ "GET", "/v1/fhir/r4/InsurancePlan/{id}", ("InsurancePlan",) ) READ_LOCATION: Final[Operation[fhir.Location]] = Operation("GET", "/v1/fhir/r4/Location/{id}", ("Location",)) +READ_MEDICATION_KNOWLEDGE: Final[Operation[fhir.MedicationKnowledge]] = Operation( + "GET", "/v1/fhir/r4/MedicationKnowledge/{id}", ("MedicationKnowledge",) +) READ_ORGANIZATION: Final[Operation[fhir.Organization]] = Operation( "GET", "/v1/fhir/r4/Organization/{id}", ("Organization",) ) @@ -94,12 +98,16 @@ ), ), ) +SEARCH_BASIC: Final[Operation[fhir.Bundle]] = Operation("GET", "/v1/fhir/r4/Basic", ("Bundle",)) SEARCH_ENDPOINT: Final[Operation[fhir.Bundle]] = Operation("GET", "/v1/fhir/r4/Endpoint", ("Bundle",)) SEARCH_HEALTHCARE_SERVICE: Final[Operation[fhir.Bundle]] = Operation( "GET", "/v1/fhir/r4/HealthcareService", ("Bundle",) ) SEARCH_INSURANCE_PLAN: Final[Operation[fhir.Bundle]] = Operation("GET", "/v1/fhir/r4/InsurancePlan", ("Bundle",)) SEARCH_LOCATION: Final[Operation[fhir.Bundle]] = Operation("GET", "/v1/fhir/r4/Location", ("Bundle",)) +SEARCH_MEDICATION_KNOWLEDGE: Final[Operation[fhir.Bundle]] = Operation( + "GET", "/v1/fhir/r4/MedicationKnowledge", ("Bundle",) +) SEARCH_ORGANIZATION: Final[Operation[fhir.Bundle]] = Operation("GET", "/v1/fhir/r4/Organization", ("Bundle",)) SEARCH_ORGANIZATION_AFFILIATION: Final[Operation[fhir.Bundle]] = Operation( "GET", "/v1/fhir/r4/OrganizationAffiliation", ("Bundle",) diff --git a/src/haau3/calls.py b/src/haau3/calls.py index 7ce1c08..56a11c0 100644 --- a/src/haau3/calls.py +++ b/src/haau3/calls.py @@ -27,10 +27,12 @@ CODE_SYSTEM_VALIDATE_CODE_POST, FHIR_METADATA, LIST_INSURANCE_PLAN_COUNTIES, + READ_BASIC, READ_ENDPOINT, READ_HEALTHCARE_SERVICE, READ_INSURANCE_PLAN, READ_LOCATION, + READ_MEDICATION_KNOWLEDGE, READ_ORGANIZATION, READ_ORGANIZATION_AFFILIATION, READ_PRACTITIONER, @@ -38,10 +40,12 @@ READ_QUESTIONNAIRE, READ_SCHEDULE, READ_SLOT, + SEARCH_BASIC, SEARCH_ENDPOINT, SEARCH_HEALTHCARE_SERVICE, SEARCH_INSURANCE_PLAN, SEARCH_LOCATION, + SEARCH_MEDICATION_KNOWLEDGE, SEARCH_ORGANIZATION, SEARCH_ORGANIZATION_AFFILIATION, SEARCH_PRACTITIONER, @@ -67,10 +71,12 @@ "code_system_validate_code_post", "fhir_metadata", "list_insurance_plan_counties", + "read_basic", "read_endpoint", "read_healthcare_service", "read_insurance_plan", "read_location", + "read_medication_knowledge", "read_organization", "read_organization_affiliation", "read_practitioner", @@ -78,10 +84,12 @@ "read_questionnaire", "read_schedule", "read_slot", + "search_basic", "search_endpoint", "search_healthcare_service", "search_insurance_plan", "search_location", + "search_medication_knowledge", "search_organization", "search_organization_affiliation", "search_practitioner", @@ -209,6 +217,14 @@ def list_insurance_plan_counties(*, state: str) -> Call[fhir.Parameters]: return make_call(LIST_INSURANCE_PLAN_COUNTIES, (), (("state", state),), None) +def read_basic(id: str, /) -> Call[fhir.Basic]: + """Read a drug on a Part D formulary, as one entry of a batch. Called as `Haau3.read_basic` is. + + `GET /v1/fhir/r4/Basic/{id}` + """ + return make_call(READ_BASIC, (id,), (), None) + + def read_endpoint(id: str, /) -> Call[fhir.Endpoint]: """Read an Endpoint, as one entry of a batch. Called as `Haau3.read_endpoint` is. @@ -241,6 +257,14 @@ def read_location(id: str, /) -> Call[fhir.Location]: return make_call(READ_LOCATION, (id,), (), None) +def read_medication_knowledge(id: str, /) -> Call[fhir.MedicationKnowledge]: + """Read a drug a Part D formulary lists, as one entry of a batch. Called as `Haau3.read_medication_knowledge` is. + + `GET /v1/fhir/r4/MedicationKnowledge/{id}` + """ + return make_call(READ_MEDICATION_KNOWLEDGE, (id,), (), None) + + def read_organization(id: str, /) -> Call[fhir.Organization]: """Read an Organization, as one entry of a batch. Called as `Haau3.read_organization` is. @@ -297,6 +321,40 @@ def read_slot(id: str, /) -> Call[fhir.Slot]: return make_call(READ_SLOT, (id,), (), None) +def search_basic( + *, + formulary: str | None = None, + subject: str | None = None, + drug_tier: str | None = None, + pharmacy_benefit_type: str | None = None, + id: str | None = None, + include: Literal["Basic:formulary", "Basic:subject"] + | Sequence[Literal["Basic:formulary", "Basic:subject"]] + | None = None, + count: int | None = None, + page: str | None = None, +) -> Call[fhir.Bundle]: + """Find drugs on a Part D formulary, as one entry of a batch. Called as `Haau3.search_basic` is. + + `GET /v1/fhir/r4/Basic` + """ + return make_call( + SEARCH_BASIC, + (), + ( + ("formulary", formulary), + ("subject", subject), + ("drug-tier", drug_tier), + ("pharmacy-benefit-type", pharmacy_benefit_type), + ("_id", id), + ("_include", include), + ("_count", count), + ("page", page), + ), + None, + ) + + def search_endpoint( *, organization: str | None = None, @@ -340,6 +398,7 @@ def search_healthcare_service( location_address_state: str | None = None, location_address_postalcode: str | None = None, location_address_city: str | None = None, + location_near: str | None = None, name: str | None = None, organization: str | None = None, organization_identifier: str | None = None, @@ -367,6 +426,7 @@ def search_healthcare_service( ("location.address-state", location_address_state), ("location.address-postalcode", location_address_postalcode), ("location.address-city", location_address_city), + ("location.near", location_near), ("name", name), ("organization", organization), ("organization.identifier", organization_identifier), @@ -390,6 +450,7 @@ def search_insurance_plan( coverage_area_state: str | None = None, coverage_area_county: str | None = None, type: str | None = None, + id: str | None = None, sold_to: Literal["individuals", "employer-groups"] | None = None, count: int | None = None, page: str | None = None, @@ -409,6 +470,7 @@ def search_insurance_plan( ("coverage-area-state", coverage_area_state), ("coverage-area-county", coverage_area_county), ("type", type), + ("_id", id), ("sold-to", sold_to), ("_count", count), ("page", page), @@ -457,6 +519,32 @@ def search_location( ) +def search_medication_knowledge( + *, + code: str | None = None, + drug_name: str | None = None, + id: str | None = None, + count: int | None = None, + page: str | None = None, +) -> Call[fhir.Bundle]: + """Find drugs any Part D formulary lists, as one entry of a batch. Called as `Haau3.search_medication_knowledge` is. + + `GET /v1/fhir/r4/MedicationKnowledge` + """ + return make_call( + SEARCH_MEDICATION_KNOWLEDGE, + (), + ( + ("code", code), + ("drug-name", drug_name), + ("_id", id), + ("_count", count), + ("page", page), + ), + None, + ) + + def search_organization( *, name: str | None = None, diff --git a/src/haau3/fhir.py b/src/haau3/fhir.py index 0cc8cbc..70744e8 100644 --- a/src/haau3/fhir.py +++ b/src/haau3/fhir.py @@ -152,6 +152,44 @@ class Attachment(TypedDict, total=False): """Extensions for creation""" +class Basic(TypedDict, total=False): + """Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.""" + resourceType: Required[Literal['Basic']] + """This is a Basic resource""" + id: str + """The logical id of the resource, as used in the URL for the resource.""" + meta: "Meta" + """The metadata about the resource.""" + implicitRules: str + """A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.""" + _implicitRules: "Element" + """Extensions for implicitRules""" + language: str + """The base language in which the resource is written.""" + _language: "Element" + """Extensions for language""" + text: "Narrative" + """A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human.""" + contained: List["Resource"] + """These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the resource.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.""" + identifier: List["Identifier"] + """Identifier assigned to the resource for business purposes, outside the context of FHIR.""" + code: Required["CodeableConcept"] + """Identifies the 'type' of resource - equivalent to the resource name for other resources.""" + subject: "Reference" + """Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.""" + created: str + """Identifies when the resource was first created.""" + _created: "Element" + """Extensions for created""" + author: "Reference" + """Indicates who was responsible for creating the resource instance.""" + + class Bundle(TypedDict, total=False): """A container for a collection of resources.""" resourceType: Required[Literal['Bundle']] @@ -2465,6 +2503,342 @@ class Medication(TypedDict, total=False): """Information that only applies to packages (not products).""" +class MedicationKnowledge(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + resourceType: Required[Literal['MedicationKnowledge']] + """This is a MedicationKnowledge resource""" + id: str + """The logical id of the resource, as used in the URL for the resource.""" + meta: "Meta" + """The metadata about the resource.""" + implicitRules: str + """A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.""" + _implicitRules: "Element" + """Extensions for implicitRules""" + language: str + """The base language in which the resource is written.""" + _language: "Element" + """Extensions for language""" + text: "Narrative" + """A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human.""" + contained: List["Resource"] + """These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the resource.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.""" + code: "CodeableConcept" + """A code that specifies this medication, or a textual description if no code is available.""" + status: str + """A code to indicate if the medication is in active use.""" + _status: "Element" + """Extensions for status""" + manufacturer: "Reference" + """Describes the details of the manufacturer of the medication product.""" + doseForm: "CodeableConcept" + """Describes the form of the item.""" + amount: "Quantity" + """Specific amount of the drug in the packaged product.""" + synonym: List[str] + """Additional names for a medication, for example, the name(s) given to a medication in different countries.""" + _synonym: List["Element"] + """Extensions for synonym""" + relatedMedicationKnowledge: List["MedicationKnowledgeRelatedMedicationKnowledge"] + """Associated or related knowledge about a medication.""" + associatedMedication: List["Reference"] + """Associated or related medications.""" + productType: List["CodeableConcept"] + """Category of the medication or product (e.g.""" + monograph: List["MedicationKnowledgeMonograph"] + """Associated documentation about the medication.""" + ingredient: List["MedicationKnowledgeIngredient"] + """Identifies a particular constituent of interest in the product.""" + preparationInstruction: str + """The instructions for preparing the medication.""" + _preparationInstruction: "Element" + """Extensions for preparationInstruction""" + intendedRoute: List["CodeableConcept"] + """The intended or approved route of administration.""" + cost: List["MedicationKnowledgeCost"] + """The price of the medication.""" + monitoringProgram: List["MedicationKnowledgeMonitoringProgram"] + """The program under which the medication is reviewed.""" + administrationGuidelines: List["MedicationKnowledgeAdministrationGuidelines"] + """Guidelines for the administration of the medication.""" + medicineClassification: List["MedicationKnowledgeMedicineClassification"] + """Categorization of the medication within a formulary or classification system.""" + packaging: "MedicationKnowledgePackaging" + """Information that only applies to packages (not products).""" + drugCharacteristic: List["MedicationKnowledgeDrugCharacteristic"] + """Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.""" + contraindication: List["Reference"] + """Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).""" + regulatory: List["MedicationKnowledgeRegulatory"] + """Regulatory information about a medication.""" + kinetics: List["MedicationKnowledgeKinetics"] + """The time course of drug absorption, distribution, metabolism and excretion of a medication from the body.""" + + +class MedicationKnowledgeAdministrationGuidelines(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + dosage: List["MedicationKnowledgeDosage"] + """Dosage for the medication for the specific guidelines.""" + indicationCodeableConcept: "CodeableConcept" + """Indication for use that apply to the specific administration guidelines.""" + indicationReference: "Reference" + """Indication for use that apply to the specific administration guidelines.""" + patientCharacteristics: List["MedicationKnowledgePatientCharacteristics"] + """Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).""" + + +class MedicationKnowledgeCost(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: Required["CodeableConcept"] + """The category of the cost information.""" + source: str + """The source or owner that assigns the price to the medication.""" + _source: "Element" + """Extensions for source""" + cost: Required["Money"] + """The price of the medication.""" + + +class MedicationKnowledgeDosage(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: Required["CodeableConcept"] + """The type of dosage (for example, prophylaxis, maintenance, therapeutic, etc.).""" + dosage: Required[List["Dosage"]] + """Dosage for the medication for the specific guidelines.""" + + +class MedicationKnowledgeDrugCharacteristic(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: "CodeableConcept" + """A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).""" + valueCodeableConcept: "CodeableConcept" + """Description of the characteristic.""" + valueString: str + """Description of the characteristic.""" + _valueString: "Element" + """Extensions for valueString""" + valueQuantity: "Quantity" + """Description of the characteristic.""" + valueBase64Binary: str + """Description of the characteristic.""" + _valueBase64Binary: "Element" + """Extensions for valueBase64Binary""" + + +class MedicationKnowledgeIngredient(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + itemCodeableConcept: "CodeableConcept" + """The actual ingredient - either a substance (simple ingredient) or another medication.""" + itemReference: "Reference" + """The actual ingredient - either a substance (simple ingredient) or another medication.""" + isActive: bool + """Indication of whether this ingredient affects the therapeutic action of the drug.""" + _isActive: "Element" + """Extensions for isActive""" + strength: "Ratio" + """Specifies how many (or how much) of the items there are in this Medication.""" + + +class MedicationKnowledgeKinetics(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + areaUnderCurve: List["Quantity"] + """The drug concentration measured at certain discrete points in time.""" + lethalDose50: List["Quantity"] + """The median lethal dose of a drug.""" + halfLifePeriod: "Duration" + """The time required for any specified property (e.g., the concentration of a substance in the body) to decrease by half.""" + + +class MedicationKnowledgeMaxDispense(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + quantity: Required["Quantity"] + """The maximum number of units of the medication that can be dispensed.""" + period: "Duration" + """The period that applies to the maximum number of units.""" + + +class MedicationKnowledgeMedicineClassification(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: Required["CodeableConcept"] + """The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification).""" + classification: List["CodeableConcept"] + """Specific category assigned to the medication (e.g.""" + + +class MedicationKnowledgeMonitoringProgram(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: "CodeableConcept" + """Type of program under which the medication is monitored.""" + name: str + """Name of the reviewing program.""" + _name: "Element" + """Extensions for name""" + + +class MedicationKnowledgeMonograph(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: "CodeableConcept" + """The category of documentation about the medication.""" + source: "Reference" + """Associated documentation about the medication.""" + + +class MedicationKnowledgePackaging(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: "CodeableConcept" + """A code that defines the specific type of packaging that the medication can be found in (e.g.""" + quantity: "Quantity" + """The number of product units the package would contain if fully loaded.""" + + +class MedicationKnowledgePatientCharacteristics(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + characteristicCodeableConcept: "CodeableConcept" + """Specific characteristic that is relevant to the administration guideline (e.g.""" + characteristicQuantity: "Quantity" + """Specific characteristic that is relevant to the administration guideline (e.g.""" + value: List[str] + """The specific characteristic (e.g.""" + _value: List["Element"] + """Extensions for value""" + + +class MedicationKnowledgeRegulatory(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + regulatoryAuthority: Required["Reference"] + """The authority that is specifying the regulations.""" + substitution: List["MedicationKnowledgeSubstitution"] + """Specifies if changes are allowed when dispensing a medication from a regulatory perspective.""" + schedule: List["MedicationKnowledgeSchedule"] + """Specifies the schedule of a medication in jurisdiction.""" + maxDispense: "MedicationKnowledgeMaxDispense" + """The maximum number of units of the medication that can be dispensed in a period.""" + + +class MedicationKnowledgeRelatedMedicationKnowledge(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: Required["CodeableConcept"] + """The category of the associated medication knowledge reference.""" + reference: Required[List["Reference"]] + """Associated documentation about the associated medication knowledge.""" + + +class MedicationKnowledgeSchedule(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + schedule: Required["CodeableConcept"] + """Specifies the specific drug schedule.""" + + +class MedicationKnowledgeSubstitution(TypedDict, total=False): + """Information about a medication that is used to support knowledge.""" + id: str + """Unique id for the element within a resource (for internal references).""" + extension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element.""" + modifierExtension: List["Extension"] + """May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.""" + type: Required["CodeableConcept"] + """Specifies the type of substitution allowed.""" + allowed: bool + """Specifies if regulation allows for changes in the medication when dispensing.""" + _allowed: "Element" + """Extensions for allowed""" + + class MedicationRequest(TypedDict, total=False): """An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.""" resourceType: Required[Literal['MedicationRequest']] @@ -4943,7 +5317,7 @@ class ValueSetParameter(TypedDict, total=False): class OtherResource(TypedDict, total=False): """A resource of a type the haau3 platform API neither answers with nor shows in an example request, as it may appear in a Bundle or `contained`.""" - resourceType: Required[Literal['Account', 'ActivityDefinition', 'AdverseEvent', 'AllergyIntolerance', 'Appointment', 'AppointmentResponse', 'AuditEvent', 'Basic', 'Binary', 'BiologicallyDerivedProduct', 'BodyStructure', 'CarePlan', 'CareTeam', 'CatalogEntry', 'ChargeItem', 'ChargeItemDefinition', 'ClaimResponse', 'ClinicalImpression', 'CodeSystem', 'Communication', 'CommunicationRequest', 'CompartmentDefinition', 'Composition', 'ConceptMap', 'Condition', 'Consent', 'Contract', 'CoverageEligibilityRequest', 'CoverageEligibilityResponse', 'DetectedIssue', 'Device', 'DeviceDefinition', 'DeviceMetric', 'DeviceRequest', 'DeviceUseStatement', 'DiagnosticReport', 'DocumentManifest', 'DocumentReference', 'EffectEvidenceSynthesis', 'Encounter', 'EnrollmentRequest', 'EnrollmentResponse', 'EpisodeOfCare', 'EventDefinition', 'Evidence', 'EvidenceVariable', 'ExampleScenario', 'ExplanationOfBenefit', 'FamilyMemberHistory', 'Flag', 'Goal', 'GraphDefinition', 'Group', 'GuidanceResponse', 'ImagingStudy', 'Immunization', 'ImmunizationEvaluation', 'ImmunizationRecommendation', 'ImplementationGuide', 'Invoice', 'Library', 'Linkage', 'List', 'Measure', 'MeasureReport', 'Media', 'MedicationAdministration', 'MedicationDispense', 'MedicationKnowledge', 'MedicinalProduct', 'MedicinalProductAuthorization', 'MedicinalProductContraindication', 'MedicinalProductIndication', 'MedicinalProductIngredient', 'MedicinalProductInteraction', 'MedicinalProductManufactured', 'MedicinalProductPackaged', 'MedicinalProductPharmaceutical', 'MedicinalProductUndesirableEffect', 'MessageDefinition', 'MolecularSequence', 'NamingSystem', 'NutritionOrder', 'Observation', 'ObservationDefinition', 'OperationDefinition', 'PaymentNotice', 'PaymentReconciliation', 'Person', 'PlanDefinition', 'Procedure', 'Provenance', 'QuestionnaireResponse', 'RelatedPerson', 'RequestGroup', 'ResearchDefinition', 'ResearchElementDefinition', 'ResearchStudy', 'ResearchSubject', 'RiskAssessment', 'RiskEvidenceSynthesis', 'SearchParameter', 'ServiceRequest', 'Specimen', 'SpecimenDefinition', 'StructureDefinition', 'StructureMap', 'Subscription', 'Substance', 'SubstanceNucleicAcid', 'SubstancePolymer', 'SubstanceProtein', 'SubstanceReferenceInformation', 'SubstanceSourceMaterial', 'SubstanceSpecification', 'SupplyDelivery', 'SupplyRequest', 'Task', 'TestReport', 'TestScript', 'VerificationResult', 'VisionPrescription']] + resourceType: Required[Literal['Account', 'ActivityDefinition', 'AdverseEvent', 'AllergyIntolerance', 'Appointment', 'AppointmentResponse', 'AuditEvent', 'Binary', 'BiologicallyDerivedProduct', 'BodyStructure', 'CarePlan', 'CareTeam', 'CatalogEntry', 'ChargeItem', 'ChargeItemDefinition', 'ClaimResponse', 'ClinicalImpression', 'CodeSystem', 'Communication', 'CommunicationRequest', 'CompartmentDefinition', 'Composition', 'ConceptMap', 'Condition', 'Consent', 'Contract', 'CoverageEligibilityRequest', 'CoverageEligibilityResponse', 'DetectedIssue', 'Device', 'DeviceDefinition', 'DeviceMetric', 'DeviceRequest', 'DeviceUseStatement', 'DiagnosticReport', 'DocumentManifest', 'DocumentReference', 'EffectEvidenceSynthesis', 'Encounter', 'EnrollmentRequest', 'EnrollmentResponse', 'EpisodeOfCare', 'EventDefinition', 'Evidence', 'EvidenceVariable', 'ExampleScenario', 'ExplanationOfBenefit', 'FamilyMemberHistory', 'Flag', 'Goal', 'GraphDefinition', 'Group', 'GuidanceResponse', 'ImagingStudy', 'Immunization', 'ImmunizationEvaluation', 'ImmunizationRecommendation', 'ImplementationGuide', 'Invoice', 'Library', 'Linkage', 'List', 'Measure', 'MeasureReport', 'Media', 'MedicationAdministration', 'MedicationDispense', 'MedicinalProduct', 'MedicinalProductAuthorization', 'MedicinalProductContraindication', 'MedicinalProductIndication', 'MedicinalProductIngredient', 'MedicinalProductInteraction', 'MedicinalProductManufactured', 'MedicinalProductPackaged', 'MedicinalProductPharmaceutical', 'MedicinalProductUndesirableEffect', 'MessageDefinition', 'MolecularSequence', 'NamingSystem', 'NutritionOrder', 'Observation', 'ObservationDefinition', 'OperationDefinition', 'PaymentNotice', 'PaymentReconciliation', 'Person', 'PlanDefinition', 'Procedure', 'Provenance', 'QuestionnaireResponse', 'RelatedPerson', 'RequestGroup', 'ResearchDefinition', 'ResearchElementDefinition', 'ResearchStudy', 'ResearchSubject', 'RiskAssessment', 'RiskEvidenceSynthesis', 'SearchParameter', 'ServiceRequest', 'Specimen', 'SpecimenDefinition', 'StructureDefinition', 'StructureMap', 'Subscription', 'Substance', 'SubstanceNucleicAcid', 'SubstancePolymer', 'SubstanceProtein', 'SubstanceReferenceInformation', 'SubstanceSourceMaterial', 'SubstanceSpecification', 'SupplyDelivery', 'SupplyRequest', 'Task', 'TestReport', 'TestScript', 'VerificationResult', 'VisionPrescription']] id: str meta: "Meta" implicitRules: str @@ -4956,5 +5330,5 @@ class OtherResource(TypedDict, total=False): modifierExtension: List["Extension"] -Resource: TypeAlias = Union[Bundle, CapabilityStatement, Claim, Coverage, Endpoint, HealthcareService, InsurancePlan, Location, Medication, MedicationRequest, MedicationStatement, MessageHeader, OperationOutcome, Organization, OrganizationAffiliation, Parameters, Patient, Practitioner, PractitionerRole, Questionnaire, Schedule, Slot, TerminologyCapabilities, ValueSet, OtherResource] +Resource: TypeAlias = Union[Basic, Bundle, CapabilityStatement, Claim, Coverage, Endpoint, HealthcareService, InsurancePlan, Location, Medication, MedicationKnowledge, MedicationRequest, MedicationStatement, MessageHeader, OperationOutcome, Organization, OrganizationAffiliation, Parameters, Patient, Practitioner, PractitionerRole, Questionnaire, Schedule, Slot, TerminologyCapabilities, ValueSet, OtherResource] """Any FHIR resource: one of the types above, told apart by `resourceType`, or `OtherResource`.""" diff --git a/src/haau3/types.py b/src/haau3/types.py index 203800c..0478dff 100644 --- a/src/haau3/types.py +++ b/src/haau3/types.py @@ -96,6 +96,9 @@ class ListInsurancePlanCountiesQuery(TypedDict, total=False): ProcessMessageResponse: TypeAlias = fhir.Bundle """What `process_message` answers with.""" +ReadBasicResponse: TypeAlias = fhir.Basic +"""What `read_basic` answers with.""" + ReadEndpointResponse: TypeAlias = fhir.Endpoint """What `read_endpoint` answers with.""" @@ -108,6 +111,9 @@ class ListInsurancePlanCountiesQuery(TypedDict, total=False): ReadLocationResponse: TypeAlias = fhir.Location """What `read_location` answers with.""" +ReadMedicationKnowledgeResponse: TypeAlias = fhir.MedicationKnowledge +"""What `read_medication_knowledge` answers with.""" + ReadOrganizationResponse: TypeAlias = fhir.Organization """What `read_organization` answers with.""" @@ -143,6 +149,23 @@ class ListInsurancePlanCountiesQuery(TypedDict, total=False): """What `sandbox_process_message` answers with.""" +class SearchBasicQuery(TypedDict, total=False): + """The query parameters of `search_basic`, by their Python names, to pass as `**query`.""" + + formulary: str + subject: str + drug_tier: str + pharmacy_benefit_type: str + id: str + include: Literal["Basic:formulary", "Basic:subject"] | Sequence[Literal["Basic:formulary", "Basic:subject"]] + count: int + page: str + + +SearchBasicResponse: TypeAlias = fhir.Bundle +"""What `search_basic` answers with.""" + + class SearchEndpointQuery(TypedDict, total=False): """The query parameters of `search_endpoint`, by their Python names, to pass as `**query`.""" @@ -171,6 +194,7 @@ class SearchHealthcareServiceQuery(TypedDict, total=False): location_address_state: str location_address_postalcode: str location_address_city: str + location_near: str name: str organization: str organization_identifier: str @@ -199,6 +223,7 @@ class SearchInsurancePlanQuery(TypedDict, total=False): coverage_area_state: str coverage_area_county: str type: str + id: str sold_to: Literal["individuals", "employer-groups"] count: int page: str @@ -229,6 +254,20 @@ class SearchLocationQuery(TypedDict, total=False): """What `search_location` answers with.""" +class SearchMedicationKnowledgeQuery(TypedDict, total=False): + """The query parameters of `search_medication_knowledge`, by their Python names, to pass as `**query`.""" + + code: str + drug_name: str + id: str + count: int + page: str + + +SearchMedicationKnowledgeResponse: TypeAlias = fhir.Bundle +"""What `search_medication_knowledge` answers with.""" + + class SearchOrganizationQuery(TypedDict, total=False): """The query parameters of `search_organization`, by their Python names, to pass as `**query`."""