{"openapi":"3.0.1","info":{"title":"Payer Access API","description":"Intercambio pagador-a-pagador CMS-0057-F según Da Vinci PDex 2.1.0. Búsqueda de miembro y recuperación del expediente longitudinal cuando un miembro cambia de plan. Solo de máquina a máquina, mediante SMART Backend Services.","version":"v1"},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Reports that the app is serving, and which image is serving it.","operationId":"get-health","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}},"head":{"tags":["Health"],"summary":"Reports that the app is serving, and which image is serving it.","operationId":"head-health","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/metadata":{"get":{"tags":["Metadata"],"summary":"Returns the FHIR R4 CapabilityStatement for this server.","operationId":"get-metadata","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirCapabilityStatement"}}}}}}},"/Patient/$member-match":{"post":{"tags":["PayerExchange"],"summary":"Matches an incoming member against First Medical's records.","description":"\n\r\n  <b>Why this endpoint exists:</b> CMS-0057-F requires a receiving\r\n            payer to retrieve a new member's history from their prior payer. Before\r\n            any data moves, the two payers must agree on <i>which</i> member is\r\n            being discussed. Da Vinci HRex defines the `$member-match`\r\n            operation for exactly this, and PDex 2.1.0 requires it as the entry\r\n            point to payer-to-payer exchange.\r\n\n\r\n  <b>Data flow:</b> requesting payer's JWT is validated → caller is\r\n            resolved to a registered payer → member consent is checked → member is\r\n            matched in the FHIR server → a member identifier is returned. No\r\n            clinical data crosses in this step.\r\n\n\r\n  <b>Why 422 on an ambiguous match:</b> returning a guess would\r\n            disclose one member's data to a request about another. The operation\r\n            returns exactly one match or none.","operationId":"post-member-match","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"requestBody":{"description":"FHIR Parameters resource carrying MemberPatient and CoverageToMatch.","content":{"application/json":{"schema":{}},"text/json":{"schema":{}},"application/*+json":{"schema":{}}}},"responses":{"200":{"description":"Exactly one member matched.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirMemberMatchParameters"}}}},"403":{"description":"Caller not authorized, or member has not opted in.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}},"422":{"description":"Zero or multiple members matched, or the request was incomplete.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}}}}},"/Patient/{id}/$everything":{"get":{"tags":["PayerExchange"],"summary":"Returns a matched member's longitudinal record.","description":"\n\r\n  <b>Why this endpoint exists:</b> CMS-0057-F requires payers to\r\n            exchange the member's clinical and claims data, including at least\r\n            5 years of claims history, within 1 business day of the member's\r\n            request. `Patient/$everything` is the FHIR R4 operation for\r\n            retrieving a patient's complete record in one call.\r\n\n\r\n  <b>Data flow:</b> consent is re-checked → `_since` is clamped\r\n            server-side to no earlier than 5 years ago → Patient, Coverage,\r\n            ExplanationOfBenefit, Claim, ClaimResponse, Condition, MedicationRequest,\r\n            AllergyIntolerance, Observation, Procedure and Immunization are read from\r\n            the FHIR server, along with the Practitioner/Organization resources those\r\n            reference → denied and drug prior authorizations are removed and the\r\n            window is applied by date of service (ExchangeScope) → returned as a\r\n            single FHIR Bundle.\r\n\n\r\n  <b>Why the window is clamped rather than validated:</b> the\r\n            regulation sets a floor on what must be shared, not a ceiling on what a\r\n            client may ask for. Clamping satisfies the request without\r\n            over-disclosing.","operationId":"get-patient-everything","parameters":[{"name":"id","in":"path","description":"FHIR Patient resource id, as returned by $member-match.","required":true,"schema":{"type":"string"}},{"name":"_since","in":"query","description":"Optional ISO 8601 lower bound; clamped to the claims window.","schema":{"type":"string"}},{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"FHIR Bundle containing the member's record.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirBundle"}}}},"403":{"description":"Caller not authorized, or member has not opted in.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}},"422":{"description":"_since is not an ISO 8601 date or date-time.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}},"502":{"description":"The clinical data store could not be reached.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}}}}},"/api/consent/{memberId}":{"get":{"tags":["PayerExchange"],"summary":"Reports a member's payer-to-payer consent status.","description":"\n\r\n  <b>Why this endpoint exists:</b> 42 CFR 422.121(b) makes\r\n            payer-to-payer exchange opt-in. A requesting payer can ask whether the\r\n            member it is about to request has opted in before it sends\r\n            $member-match. Returns only the consent decision, never clinical data.\r\n\n\r\n  <b>Same gate as the exchange operations (QA-51):</b> the gateway\r\n            admits only a client_credentials token granting payer/Exchange.read, and\r\n            this action then requires the client to be a registered requesting\r\n            payer, as $member-match and $everything do. It used to accept any\r\n            authenticated token, so a credential the gateway would never admit could\r\n            read any member's decision from inside the network.\r\n\nA member with no decision on record, an id that matches no member\r\n            and a member without active Vital coverage answer alike, optedIn false,\r\n            so the operation cannot be used to probe for membership or line.","operationId":"get-consent","parameters":[{"name":"memberId","in":"path","description":"First Medical member identifier.","required":true,"schema":{"type":"string"}},{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"The member's consent decision.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentStatus"}}}},"403":{"description":"Caller is not an authorized requesting payer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}}}}},"/.well-known/smart-configuration":{"get":{"tags":["SmartConfiguration"],"summary":"Returns the SMART Backend Services configuration.","operationId":"get-smart-configuration","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartConfiguration"}}}}}}},"/Patient/$everything":{"get":{"tags":["UnsupportedOperations"],"summary":"Type-level Patient/$everything is not supported; use Patient/{id}/$everything.","operationId":"get-patient-everything-type","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"404":{"description":"OperationOutcome, code not-supported.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}}}},"post":{"tags":["UnsupportedOperations"],"summary":"Type-level Patient/$everything is not supported; use Patient/{id}/$everything.","operationId":"post-patient-everything-type","parameters":[{"name":"api-version","in":"query","schema":{"type":"string"}},{"name":"x-api-version","in":"header","schema":{"type":"string"}}],"responses":{"404":{"description":"OperationOutcome, code not-supported.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirOperationOutcome"}}}}}}},"/openapi.json":{"get":{"tags":["Discovery"],"summary":"This OpenAPI document","description":"The OpenAPI 3 description of this API, readable without a token.","operationId":"get-openapi","responses":{"200":{"description":"The OpenAPI document.","content":{"application/json":{"schema":{"required":["openapi","info","paths"],"type":"object","description":"An OpenAPI 3.0 document."}}}}}}}},"components":{"schemas":{"ConsentStatus":{"type":"object","properties":{"memberId":{"type":"string","description":"The member identifier the caller asked about.","nullable":true},"optedIn":{"type":"boolean","description":"True only when an affirmative opt-in is on record."}},"description":"A member's payer-to-payer consent decision, and nothing else."},"FhirBundle":{"type":"object","properties":{"resourceType":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"total":{"type":"integer","format":"int32","nullable":true},"link":{"type":"array","items":{"$ref":"#/components/schemas/FhirBundleLink"},"nullable":true},"entry":{"type":"array","items":{"$ref":"#/components/schemas/FhirBundleEntry"},"nullable":true}},"description":"A FHIR R4 searchset Bundle. Entries are US Core 7.0.0 and CARIN C4BB\r\nresources, as listed on Patient/{id}/$everything."},"FhirBundleEntry":{"type":"object","properties":{"fullUrl":{"type":"string","nullable":true},"resource":{"type":"object","additionalProperties":{},"nullable":true}},"description":"A Bundle entry. resource is a FHIR R4 resource."},"FhirBundleLink":{"type":"object","properties":{"relation":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"description":"A Bundle link, for example the next page."},"FhirCapabilityStatement":{"type":"object","properties":{"resourceType":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"date":{"type":"string","nullable":true},"kind":{"type":"string","nullable":true},"fhirVersion":{"type":"string","nullable":true},"format":{"type":"array","items":{"type":"string"},"nullable":true},"instantiates":{"type":"array","items":{"type":"string"},"nullable":true},"rest":{"type":"array","items":{"type":"object","additionalProperties":{}},"nullable":true}},"description":"The FHIR R4 CapabilityStatement, instantiating the PDex server statement.\r\nThe rest element follows the FHIR specification."},"FhirIdentifier":{"type":"object","properties":{"system":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"description":"A FHIR Identifier."},"FhirMemberMatchParameters":{"type":"object","properties":{"resourceType":{"type":"string","nullable":true},"parameter":{"type":"array","items":{"$ref":"#/components/schemas/FhirParameter"},"nullable":true}},"description":"The FHIR Parameters resource $member-match returns (Da Vinci HRex): a\r\nMemberIdentifier and a PatientReference."},"FhirOperationOutcome":{"type":"object","properties":{"resourceType":{"type":"string","nullable":true},"issue":{"type":"array","items":{"$ref":"#/components/schemas/FhirOperationOutcomeIssue"},"nullable":true}},"description":"A FHIR R4 OperationOutcome. Every error this API answers carries one."},"FhirOperationOutcomeIssue":{"type":"object","properties":{"severity":{"type":"string","description":"fatal, error, warning or information.","nullable":true},"code":{"type":"string","description":"FHIR issue type, for example forbidden, processing or not-supported.","nullable":true},"diagnostics":{"type":"string","description":"Human readable detail. Never names a member.","nullable":true}},"description":"One issue of an OperationOutcome."},"FhirParameter":{"type":"object","properties":{"name":{"type":"string","nullable":true},"valueIdentifier":{"$ref":"#/components/schemas/FhirIdentifier"},"valueString":{"type":"string","nullable":true}},"description":"One parameter of a Parameters resource."},"HealthStatus":{"type":"object","properties":{"status":{"type":"string","nullable":true},"gitSha":{"type":"string","nullable":true},"buildNumber":{"type":"string","nullable":true},"builtAt":{"type":"string","nullable":true}},"description":"Liveness and the image serving it."},"SmartConfiguration":{"type":"object","properties":{"issuer":{"type":"string","nullable":true},"jwks_uri":{"type":"string","nullable":true},"token_endpoint":{"type":"string","nullable":true},"grant_types_supported":{"type":"array","items":{"type":"string"},"nullable":true},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"nullable":true},"token_endpoint_auth_signing_alg_values_supported":{"type":"array","items":{"type":"string"},"nullable":true},"scopes_supported":{"type":"array","items":{"type":"string"},"nullable":true},"capabilities":{"type":"array","items":{"type":"string"},"nullable":true}},"description":"The SMART Backend Services discovery document."}},"securitySchemes":{"Bearer":{"type":"http","description":"Paste a JWT token.","scheme":"Bearer","bearerFormat":"JWT"},"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://apim-fmcom-interoppatientaccess-prod-001.azure-api.net/smart-auth/api/token","scopes":{"payer/Exchange.read":"Payer-to-payer exchange for a matched member"}}}}}},"security":[{"Bearer":[]},{"oauth2":["payer/Exchange.read"]}],"servers":[{"url":"https://apim-fmcom-interoppatientaccess-prod-001.azure-api.net/payer-access"}]}