The only way to remove an external identifier — update_patient never removes.
DELETE
/
v1
/
patients
/
{patient_id}
/
external-identifiers
import olirafrom olira import ExternalIdentifierMatcherolira.init(api_key="YOUR_API_KEY")# system + value — exactly one identifierone = ExternalIdentifierMatcher(system="my-crm", value="CRM-4471")# system only — every identifier for that system# (system="epic" unlinks every connected Epic instance)all_for_system = ExternalIdentifierMatcher(system="epic")# integration_id only — every identifier owned by one instance (one hospital)one_hospital = ExternalIdentifierMatcher(integration_id="66f0a1...")# system + integration_id — that system on that instance onlyepic_at_hospital = ExternalIdentifierMatcher(system="epic", integration_id="66f0a1...")result = olira.remove_patient_external_identifiers( patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers=[one],)print(result.removed, result.skipped)
using Olira;OliraModule.Init(apiKey: "YOUR_API_KEY");// System + Value — exactly one identifiervar one = new ExternalIdentifierMatcher { System = "my-crm", Value = "CRM-4471" };// System only — every identifier for that system// (System = "epic" unlinks every connected Epic instance)var allForSystem = new ExternalIdentifierMatcher { System = "epic" };// IntegrationId only — every identifier owned by one instance (one hospital)var oneHospital = new ExternalIdentifierMatcher { IntegrationId = "66f0a1..." };// System + IntegrationId — that system on that instance onlyvar epicAtHospital = new ExternalIdentifierMatcher { System = "epic", IntegrationId = "66f0a1..." };var result = OliraModule.RemovePatientExternalIdentifiers( patientId: "8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers: [one]);Console.WriteLine($"{result.Removed} {result.Skipped}");
Requires scope:api:manage-patientsEach entry is a matcher: system + value (one row); system only (every identifier for that system — system=epic unlinks every connected Epic instance, use integration_id alone to drop one hospital); integration_id only (that instance); system + integration_id (that system on that instance). Can match ANY identifier, including one owned by a platform integration: this is a deliberate, irreversible unlink, and under linked_only import mode the patient immediately stops receiving further data from that integration. Idempotent — a matcher that matches nothing is skipped, not an error.
Matchers — a filter, not a full identifier. Construct with any of the shapes below. Rows match every field you set. At least one field is required. value without system is rejected (422).
System name, e.g. epic. Alone: every identifier for that system. system=“epic” unlinks every connected Epic instance — use integration_id alone to drop one hospital.
Connection timeout, DNS failure, or read error after retries.
import olirafrom olira import ExternalIdentifierMatcherolira.init(api_key="YOUR_API_KEY")# system + value — exactly one identifierone = ExternalIdentifierMatcher(system="my-crm", value="CRM-4471")# system only — every identifier for that system# (system="epic" unlinks every connected Epic instance)all_for_system = ExternalIdentifierMatcher(system="epic")# integration_id only — every identifier owned by one instance (one hospital)one_hospital = ExternalIdentifierMatcher(integration_id="66f0a1...")# system + integration_id — that system on that instance onlyepic_at_hospital = ExternalIdentifierMatcher(system="epic", integration_id="66f0a1...")result = olira.remove_patient_external_identifiers( patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers=[one],)print(result.removed, result.skipped)
using Olira;OliraModule.Init(apiKey: "YOUR_API_KEY");// System + Value — exactly one identifiervar one = new ExternalIdentifierMatcher { System = "my-crm", Value = "CRM-4471" };// System only — every identifier for that system// (System = "epic" unlinks every connected Epic instance)var allForSystem = new ExternalIdentifierMatcher { System = "epic" };// IntegrationId only — every identifier owned by one instance (one hospital)var oneHospital = new ExternalIdentifierMatcher { IntegrationId = "66f0a1..." };// System + IntegrationId — that system on that instance onlyvar epicAtHospital = new ExternalIdentifierMatcher { System = "epic", IntegrationId = "66f0a1..." };var result = OliraModule.RemovePatientExternalIdentifiers( patientId: "8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers: [one]);Console.WriteLine($"{result.Removed} {result.Skipped}");
import olirafrom olira import ExternalIdentifierMatcherolira.init(api_key="YOUR_API_KEY")# system + value — exactly one identifierone = ExternalIdentifierMatcher(system="my-crm", value="CRM-4471")# system only — every identifier for that system# (system="epic" unlinks every connected Epic instance)all_for_system = ExternalIdentifierMatcher(system="epic")# integration_id only — every identifier owned by one instance (one hospital)one_hospital = ExternalIdentifierMatcher(integration_id="66f0a1...")# system + integration_id — that system on that instance onlyepic_at_hospital = ExternalIdentifierMatcher(system="epic", integration_id="66f0a1...")result = olira.remove_patient_external_identifiers( patient_id="8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers=[one],)print(result.removed, result.skipped)
using Olira;OliraModule.Init(apiKey: "YOUR_API_KEY");// System + Value — exactly one identifiervar one = new ExternalIdentifierMatcher { System = "my-crm", Value = "CRM-4471" };// System only — every identifier for that system// (System = "epic" unlinks every connected Epic instance)var allForSystem = new ExternalIdentifierMatcher { System = "epic" };// IntegrationId only — every identifier owned by one instance (one hospital)var oneHospital = new ExternalIdentifierMatcher { IntegrationId = "66f0a1..." };// System + IntegrationId — that system on that instance onlyvar epicAtHospital = new ExternalIdentifierMatcher { System = "epic", IntegrationId = "66f0a1..." };var result = OliraModule.RemovePatientExternalIdentifiers( patientId: "8a4fde23-0f1b-4c2a-9d7e-b36c1a5f0e82", identifiers: [one]);Console.WriteLine($"{result.Removed} {result.Skipped}");