<?xml version="1.0" encoding="UTF-8"?>

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="InsurancePlan-in-network"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition InsurancePlan-in-network</b></p><a name="InsurancePlan-in-network"> </a><a name="hcInsurancePlan-in-network"> </a><p>URL: [base]/InsurancePlan/[id]/$in-network</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>npi</td><td/><td>1..20</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>A provider's ten-digit National Provider Identifier, a practitioner's or an organization's. Repeat the parameter for each NPI, or separate them by commas.</p>
</div></td></tr><tr><td>OUT</td><td>plan</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a> (<a href="http://hl7.org/fhir/R4/insuranceplan.html" title="http://hl7.org/fhir/StructureDefinition/InsurancePlan">InsurancePlan</a>)</td><td/><td><div><p>The plan checked.</p>
</div></td></tr><tr><td>OUT</td><td>data-date</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#date">date</a></td><td/><td><div><p>The day the directory last reloaded its record of the plan. Absent when the directory holds no record of it, and for a Marketplace plan.</p>
</div></td></tr><tr><td>OUT</td><td>network</td><td/><td>0..*</td><td/><td/><td><div><p>One network the directory's plan names for the plan's year. Absent when the plan has no network data.</p>
</div></td></tr><tr><td>OUT</td><td>network.network</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a> (<a href="http://hl7.org/fhir/R4/organization.html" title="http://hl7.org/fhir/StructureDefinition/Organization">Organization</a>)</td><td/><td><div><p>The network, an Organization the directory holds, readable on this base, with its name as the display.</p>
</div></td></tr><tr><td>OUT</td><td>network.organizations-listed</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#integer">integer</a></td><td/><td><div><p>How many organization affiliations name the network. The directory cannot count the practitioner roles that name it, so this is not the network's size, and a network listing no organization may still list practitioners.</p>
</div></td></tr><tr><td>OUT</td><td>reason</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td><a href="ValueSet-plan-benefits-no-network-data-reason.html">Plan Benefits No Network Data Reason</a> (Required)</td><td><div><p>Why the plan has no network data, when it has none; every provider's status is then no-network-data.</p>
</div></td></tr><tr><td>OUT</td><td>directory</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#url">url</a></td><td/><td><div><p>A Marketplace plan's own provider directory, as its insurer files it with CMS, when one is filed.</p>
</div></td></tr><tr><td>OUT</td><td>provider</td><td/><td>1..20</td><td/><td/><td><div><p>One NPI asked about, in the order sent.</p>
</div></td></tr><tr><td>OUT</td><td>provider.npi</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#Identifier">Identifier</a></td><td/><td><div><p>The NPI, in the system http://hl7.org/fhir/sid/us-npi.</p>
</div></td></tr><tr><td>OUT</td><td>provider.status</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td><a href="ValueSet-plan-benefits-network-status.html">Plan Benefits Network Status</a> (Required)</td><td><div><p>What the directory says about this provider and this plan's networks.</p>
</div></td></tr><tr><td>OUT</td><td>provider.evidence</td><td/><td>0..*</td><td><a href="http://hl7.org/fhir/R4/references.html#Reference">Reference</a> (<a href="http://hl7.org/fhir/R4/practitionerrole.html" title="http://hl7.org/fhir/StructureDefinition/PractitionerRole">PractitionerRole</a>, <a href="http://hl7.org/fhir/R4/organizationaffiliation.html" title="http://hl7.org/fhir/StructureDefinition/OrganizationAffiliation">OrganizationAffiliation</a>)</td><td/><td><div><p>Each directory record that lists the provider in one of the plan's networks, readable on this base. Present only with in-network.</p>
</div></td></tr><tr><td>OUT</td><td>source</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>The directory asked and its address, present whenever the directory was asked.</p>
</div></td></tr></table><div><p>GET [base]/InsurancePlan/H2406-013-000/$in-network?npi=1992700001&amp;npi=1992700002, or with the NPIs separated by commas. At most 20 NPIs, ten digits each; a duplicate counts once. A missing npi, an NPI that is not ten digits, more than 20 NPIs or another parameter is refused with 400; a plan id the releases being served do not hold answers 404. The answer is all or nothing: a directory lookup that fails, or that cannot be read with confidence, fails the whole answer with 502, 503 or 504, never a partial list.</p>
</div></div>
  </text>
  <url value="https://haau3.com/fhir/OperationDefinition/InsurancePlan-in-network"/>
  <version value="1.0.0"/>
  <name value="InsurancePlanInNetwork"/>
  <title value="Check providers against a plan's network"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2026-10-14"/>
  <publisher value="haau3"/>
  <contact>
    <name value="haau3"/>
    <telecom>
      <system value="url"/>
      <value value="https://haau3.com"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="hello@haau3.com"/>
    </telecom>
  </contact>
  <description value="For each NPI asked about, whether the CMS National Provider Directory lists the provider in a network this plan names, for the plan's year: by a practitioner role or an organization affiliation that names the network. The directory's plan is found by the plan's CMS plan id, and its record counts only when its period covers the plan's year. A Medicare Advantage plan is checked against the directory; a Marketplace plan answers that the directory holds no network data for it, with the plan's own provider directory. Each provider's status is a code from [Plan Benefits Network Status](CodeSystem-plan-benefits-network-status.html); when the plan has no network data, the reason is a code from [Plan Benefits No Network Data Reason](CodeSystem-plan-benefits-no-network-data-reason.html). A listing is not a statement of a contract, and not-found never means a provider is out of network: the directory's network data is incomplete."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <affectsState value="false"/>
  <code value="in-network"/>
  <comment value="GET [base]/InsurancePlan/H2406-013-000/$in-network?npi=1992700001&amp;npi=1992700002, or with the NPIs separated by commas. At most 20 NPIs, ten digits each; a duplicate counts once. A missing npi, an NPI that is not ten digits, more than 20 NPIs or another parameter is refused with 400; a plan id the releases being served do not hold answers 404. The answer is all or nothing: a directory lookup that fails, or that cannot be read with confidence, fails the whole answer with 502, 503 or 504, never a partial list."/>
  <resource value="InsurancePlan"/>
  <system value="false"/>
  <type value="false"/>
  <instance value="true"/>
  <parameter>
    <name value="npi"/>
    <use value="in"/>
    <min value="1"/>
    <max value="20"/>
    <documentation value="A provider's ten-digit National Provider Identifier, a practitioner's or an organization's. Repeat the parameter for each NPI, or separate them by commas."/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="plan"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="The plan checked."/>
    <type value="Reference"/>
    <targetProfile value="http://hl7.org/fhir/StructureDefinition/InsurancePlan"/>
  </parameter>
  <parameter>
    <name value="data-date"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The day the directory last reloaded its record of the plan. Absent when the directory holds no record of it, and for a Marketplace plan."/>
    <type value="date"/>
  </parameter>
  <parameter>
    <name value="network"/>
    <use value="out"/>
    <min value="0"/>
    <max value="*"/>
    <documentation value="One network the directory's plan names for the plan's year. Absent when the plan has no network data."/>
    <part>
      <name value="network"/>
      <use value="out"/>
      <min value="1"/>
      <max value="1"/>
      <documentation value="The network, an Organization the directory holds, readable on this base, with its name as the display."/>
      <type value="Reference"/>
      <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
    </part>
    <part>
      <name value="organizations-listed"/>
      <use value="out"/>
      <min value="1"/>
      <max value="1"/>
      <documentation value="How many organization affiliations name the network. The directory cannot count the practitioner roles that name it, so this is not the network's size, and a network listing no organization may still list practitioners."/>
      <type value="integer"/>
    </part>
  </parameter>
  <parameter>
    <name value="reason"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Why the plan has no network data, when it has none; every provider's status is then no-network-data."/>
    <type value="CodeableConcept"/>
    <binding>
      <strength value="required"/>
      <valueSet value="https://haau3.com/fhir/ValueSet/plan-benefits-no-network-data-reason"/>
    </binding>
  </parameter>
  <parameter>
    <name value="directory"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="A Marketplace plan's own provider directory, as its insurer files it with CMS, when one is filed."/>
    <type value="url"/>
  </parameter>
  <parameter>
    <name value="provider"/>
    <use value="out"/>
    <min value="1"/>
    <max value="20"/>
    <documentation value="One NPI asked about, in the order sent."/>
    <part>
      <name value="npi"/>
      <use value="out"/>
      <min value="1"/>
      <max value="1"/>
      <documentation value="The NPI, in the system http://hl7.org/fhir/sid/us-npi."/>
      <type value="Identifier"/>
    </part>
    <part>
      <name value="status"/>
      <use value="out"/>
      <min value="1"/>
      <max value="1"/>
      <documentation value="What the directory says about this provider and this plan's networks."/>
      <type value="Coding"/>
      <binding>
        <strength value="required"/>
        <valueSet value="https://haau3.com/fhir/ValueSet/plan-benefits-network-status"/>
      </binding>
    </part>
    <part>
      <name value="evidence"/>
      <use value="out"/>
      <min value="0"/>
      <max value="*"/>
      <documentation value="Each directory record that lists the provider in one of the plan's networks, readable on this base. Present only with in-network."/>
      <type value="Reference"/>
      <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
      <targetProfile value="http://hl7.org/fhir/StructureDefinition/OrganizationAffiliation"/>
    </part>
  </parameter>
  <parameter>
    <name value="source"/>
    <use value="out"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The directory asked and its address, present whenever the directory was asked."/>
    <type value="string"/>
  </parameter>
</OperationDefinition>