---
title: "Replace Patient"
method: PUT
path: "/main/Patient/{id}"
tags: ["Patient"]
---

# Replace Patient

`PUT /main/Patient/{id}`

Replaces the entire patient record with provided data

## Path parameters

- `id` string, required

## Request body

- Patient — Demographics and other administrative information about an individual or animal receiving care or other health-related services. See https://www.hl7.org/fhir/R4/patient.html
  - `identifier` FhirIdentifier[] — An identifier for this patient
    - `use` 'usual' | 'official' | 'temp' | 'secondary' | 'old' | 'null', nullable
    - `type` FhirCodeableConcept
      - `coding` FhirCoding[] — defined by a terminology system
        - `system` string, uri, nullable — Identity of the terminology system
        - `code` string, nullable — Symbol in syntax defined by the system
        - `display` string, nullable — Representation defined by the system
        - `userSelected` boolean, nullable — If this coding was chosen directly by the user
        - `id` string, nullable — ID of the FHIR element (optional)
      - `text` string, nullable — Plain text representation of the concept
      - `id` string, nullable — ID of the FHIR element (optional)
    - `system` string, nullable — The namespace for the identifier value
    - `value` string, nullable — The unique identifier
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable — ID of the FHIR element (optional)
    - `assigner` FhirReference
      - `reference` string, required — The URL (relative or absolute) to the resource being referenced
      - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
      - `id` string, nullable — ID of the FHIR element (optional)
    - `id` string, nullable — ID of the FHIR element (optional)
  - `active` boolean, nullable — Indicates whether this patient profile is active based on the patient status - patient status considered active: Current, Claimant, Contact
  - `name` FhirHumanName[], required — The name of the patient
    - `use` 'usual' | 'official' | 'null', nullable — The type of name - 'official' for legal names, 'usual' for single name
    - `text` string, nullable — The full name in text format
    - `family` string, nullable — Family name (often called 'surname')
    - `given` string[] — Given names - includes middle name/s
    - `prefix` string[] — Title before the patient's name
    - `id` string, nullable — ID of the FHIR element (optional)
  - `telecom` FhirContactPoint[] — A contact detail for the individual
    - `system` 'phone' | 'fax' | 'email' | 'sms' | 'null', nullable — Type of contact detail
    - `value` string, nullable — The actual phone number or email address
    - `use` 'home' | 'work' | 'mobile' | 'null', nullable — Purpose of the contact detail
    - `id` string, nullable — ID of the FHIR element (optional)
  - `gender` string, nullable — male | female | other | custom gender
  - `birthDate` string, date, nullable — The date of birth for the individual
  - `deceasedBoolean` boolean, nullable — Indicates whether this patient profile is deceased based on the patient status
  - `address` FhirAddress[] — An address for the individual
    - `use` 'home' | 'work' | 'billing' | 'mailing' | 'null', nullable — The purpose of this address
    - `type` 'both' | 'null', nullable — Distinguishes between a physical address and mailing address
    - `text` string, nullable — The full address in text format
    - `line` string[] — Contains the street name, number, direction and P.O. Box in the order in which lines should appear on an address label
    - `city` string, nullable — Name of city or town
    - `state` string, nullable — State, province, or regions in ISO 3166-2 code (e.g., VIC, AUK, ON)
    - `postalCode` string, nullable — Postal or zip code of address
    - `country` string, nullable — Country of the address in ISO 3166-1 alpha-2 code (e.g., AU, NZ, CA)
    - `id` string, nullable — ID of the FHIR element (optional)
  - `contact` FhirPatientContact[] — A contact party (e.g. guardian, partner, friend) for the patient
    - `id` string, nullable — Id of the Contact
    - `relationship` FhirCodeableConcept[] — The type of contact and the contact's relationship to the patient
      - `coding` FhirCoding[] — defined by a terminology system
        - `system` string, uri, nullable — Identity of the terminology system
        - `code` string, nullable — Symbol in syntax defined by the system
        - `display` string, nullable — Representation defined by the system
        - `userSelected` boolean, nullable — If this coding was chosen directly by the user
        - `id` string, nullable — ID of the FHIR element (optional)
      - `text` string, nullable — Plain text representation of the concept
      - `id` string, nullable — ID of the FHIR element (optional)
    - `name` FhirHumanName
      - `use` 'usual' | 'official' | 'null', nullable — The type of name - 'official' for legal names, 'usual' for single name
      - `text` string, nullable — The full name in text format
      - `family` string, nullable — Family name (often called 'surname')
      - `given` string[] — Given names - includes middle name/s
      - `prefix` string[] — Title before the patient's name
      - `id` string, nullable — ID of the FHIR element (optional)
    - `telecom` FhirContactPoint[] — A contact detail for the contact person
      - `system` 'phone' | 'fax' | 'email' | 'sms' | 'null', nullable — Type of contact detail
      - `value` string, nullable — The actual phone number or email address
      - `use` 'home' | 'work' | 'mobile' | 'null', nullable — Purpose of the contact detail
      - `id` string, nullable — ID of the FHIR element (optional)
    - `gender` string, nullable — male | female | other | unknown
  - `generalPractitioner` FhirReference[] — Practitioner/s and location/s where they patient has records with
    - `reference` string, required — The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
    - `id` string, nullable — ID of the FHIR element (optional)
  - `managingOrganization` FhirReference, required
    - `reference` string, required — The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
    - `id` string, nullable — ID of the FHIR element (optional)
  - `attachments` FhirAttachment[] — File attachments to the patient profile. Write-only: accepted in the request body (e.g. POST/PUT) but not returned in any response, including GET /Patient.
    - `data` string — The file encoded to base64 (maximum 20MB)
    - `contentType` 'application/json' | 'application/xml' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/pdf' | 'text/html' | 'text/xml' | 'text/plain' | 'image/jpeg' | 'image/png' | 'video/mp4' | 'application/zip' | 'application/fhir+json' — The file format of the file attachment
    - `language` 'ar' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'es' | 'fi' | 'fr' | 'fy' | 'hi' | 'hr' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pa' | 'pl' | 'pt' | 'ru' | 'sr' | 'sv' | 'te' | 'zh' | 'null', nullable — Human language of the content (BCP-47)
    - `url` string, nullable — Uri where the data can be found
    - `size` integer, nullable — Number of bytes of content (if url provided)
    - `hash` string, nullable — Hash of the data (sha-1, base64ed)
    - `title` string, nullable — The file name
    - `creation` string, date-time, nullable — The date and time that the file attachment was first created
    - `id` string, nullable — ID of the FHIR element (optional)
  - `text` FhirNarrative
    - `status` 'generated' | 'extensions' | 'additional' | 'empty' — Describes how the narrative was generated
    - `div` string — Limited xhtml content
    - `id` string, nullable — ID of the FHIR element (optional)
  - `contained` AbstractFhirResource[] — Contained, inline Resources
    - `id` string, nullable — Logical id of this artifact
    - `meta` FhirResourceMeta
      - `lastUpdated` string, date-time, nullable — When the resource version last changed
      - `profile` string[] — Profiles this resource claims to conform to
    - `resourceType` string, nullable — Resource Type
  - `id` string, nullable — The patient ID in the practice group
  - `meta` FhirResourceMeta
    - `lastUpdated` string, date-time, nullable — When the resource version last changed
    - `profile` string[] — Profiles this resource claims to conform to
  - `resourceType` string, nullable — Resource Type

## Response `200`

Patient resource updated

- Patient — Demographics and other administrative information about an individual or animal receiving care or other health-related services. See https://www.hl7.org/fhir/R4/patient.html
  - `identifier` FhirIdentifier[] — An identifier for this patient
    - `use` 'usual' | 'official' | 'temp' | 'secondary' | 'old' | 'null', nullable
    - `type` FhirCodeableConcept
      - `coding` FhirCoding[] — defined by a terminology system
        - `system` string, uri, nullable — Identity of the terminology system
        - `code` string, nullable — Symbol in syntax defined by the system
        - `display` string, nullable — Representation defined by the system
        - `userSelected` boolean, nullable — If this coding was chosen directly by the user
        - `id` string, nullable — ID of the FHIR element (optional)
      - `text` string, nullable — Plain text representation of the concept
      - `id` string, nullable — ID of the FHIR element (optional)
    - `system` string, nullable — The namespace for the identifier value
    - `value` string, nullable — The unique identifier
    - `period` FhirPeriodDateTime
      - `start` string, date-time, nullable
      - `end` string, date-time, nullable
      - `id` string, nullable — ID of the FHIR element (optional)
    - `assigner` FhirReference
      - `reference` string, required — The URL (relative or absolute) to the resource being referenced
      - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
      - `id` string, nullable — ID of the FHIR element (optional)
    - `id` string, nullable — ID of the FHIR element (optional)
  - `active` boolean, nullable — Indicates whether this patient profile is active based on the patient status - patient status considered active: Current, Claimant, Contact
  - `name` FhirHumanName[], required — The name of the patient
    - `use` 'usual' | 'official' | 'null', nullable — The type of name - 'official' for legal names, 'usual' for single name
    - `text` string, nullable — The full name in text format
    - `family` string, nullable — Family name (often called 'surname')
    - `given` string[] — Given names - includes middle name/s
    - `prefix` string[] — Title before the patient's name
    - `id` string, nullable — ID of the FHIR element (optional)
  - `telecom` FhirContactPoint[] — A contact detail for the individual
    - `system` 'phone' | 'fax' | 'email' | 'sms' | 'null', nullable — Type of contact detail
    - `value` string, nullable — The actual phone number or email address
    - `use` 'home' | 'work' | 'mobile' | 'null', nullable — Purpose of the contact detail
    - `id` string, nullable — ID of the FHIR element (optional)
  - `gender` string, nullable — male | female | other | custom gender
  - `birthDate` string, date, nullable — The date of birth for the individual
  - `deceasedBoolean` boolean, nullable — Indicates whether this patient profile is deceased based on the patient status
  - `address` FhirAddress[] — An address for the individual
    - `use` 'home' | 'work' | 'billing' | 'mailing' | 'null', nullable — The purpose of this address
    - `type` 'both' | 'null', nullable — Distinguishes between a physical address and mailing address
    - `text` string, nullable — The full address in text format
    - `line` string[] — Contains the street name, number, direction and P.O. Box in the order in which lines should appear on an address label
    - `city` string, nullable — Name of city or town
    - `state` string, nullable — State, province, or regions in ISO 3166-2 code (e.g., VIC, AUK, ON)
    - `postalCode` string, nullable — Postal or zip code of address
    - `country` string, nullable — Country of the address in ISO 3166-1 alpha-2 code (e.g., AU, NZ, CA)
    - `id` string, nullable — ID of the FHIR element (optional)
  - `contact` FhirPatientContact[] — A contact party (e.g. guardian, partner, friend) for the patient
    - `id` string, nullable — Id of the Contact
    - `relationship` FhirCodeableConcept[] — The type of contact and the contact's relationship to the patient
      - `coding` FhirCoding[] — defined by a terminology system
        - `system` string, uri, nullable — Identity of the terminology system
        - `code` string, nullable — Symbol in syntax defined by the system
        - `display` string, nullable — Representation defined by the system
        - `userSelected` boolean, nullable — If this coding was chosen directly by the user
        - `id` string, nullable — ID of the FHIR element (optional)
      - `text` string, nullable — Plain text representation of the concept
      - `id` string, nullable — ID of the FHIR element (optional)
    - `name` FhirHumanName
      - `use` 'usual' | 'official' | 'null', nullable — The type of name - 'official' for legal names, 'usual' for single name
      - `text` string, nullable — The full name in text format
      - `family` string, nullable — Family name (often called 'surname')
      - `given` string[] — Given names - includes middle name/s
      - `prefix` string[] — Title before the patient's name
      - `id` string, nullable — ID of the FHIR element (optional)
    - `telecom` FhirContactPoint[] — A contact detail for the contact person
      - `system` 'phone' | 'fax' | 'email' | 'sms' | 'null', nullable — Type of contact detail
      - `value` string, nullable — The actual phone number or email address
      - `use` 'home' | 'work' | 'mobile' | 'null', nullable — Purpose of the contact detail
      - `id` string, nullable — ID of the FHIR element (optional)
    - `gender` string, nullable — male | female | other | unknown
  - `generalPractitioner` FhirReference[] — Practitioner/s and location/s where they patient has records with
    - `reference` string, required — The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
    - `id` string, nullable — ID of the FHIR element (optional)
  - `managingOrganization` FhirReference, required
    - `reference` string, required — The URL (relative or absolute) to the resource being referenced
    - `type` 'Organization' | 'Patient' | 'Practitioner' | 'PractitionerRole' | 'Appointment' | 'Coverage' | 'Invoice' | 'Communication' | 'Group' | 'DocumentReference' | 'InvoiceLine' | 'PaymentTransaction' | 'Referral' | 'ReferralDefinition' | 'Schedule' | 'Slot' | 'HealthcareService' | 'AllergyIntolerance' | 'Condition' | 'Immunization' | 'Subscription' | 'SubscriptionTopic' | 'ChargeItemDefinition' | 'ServiceRequest' | 'Medication' | 'MedicationRequest' | 'Questionnaire' | 'QuestionnaireResponse' | 'Observation' | 'Binary' | 'Bundle' | 'OperationOutcome' | 'Parameters' | 'List' | 'null', nullable — The type of resource being referenced
    - `id` string, nullable — ID of the FHIR element (optional)
  - `attachments` FhirAttachment[] — File attachments to the patient profile. Write-only: accepted in the request body (e.g. POST/PUT) but not returned in any response, including GET /Patient.
    - `data` string — The file encoded to base64 (maximum 20MB)
    - `contentType` 'application/json' | 'application/xml' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/pdf' | 'text/html' | 'text/xml' | 'text/plain' | 'image/jpeg' | 'image/png' | 'video/mp4' | 'application/zip' | 'application/fhir+json' — The file format of the file attachment
    - `language` 'ar' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'es' | 'fi' | 'fr' | 'fy' | 'hi' | 'hr' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pa' | 'pl' | 'pt' | 'ru' | 'sr' | 'sv' | 'te' | 'zh' | 'null', nullable — Human language of the content (BCP-47)
    - `url` string, nullable — Uri where the data can be found
    - `size` integer, nullable — Number of bytes of content (if url provided)
    - `hash` string, nullable — Hash of the data (sha-1, base64ed)
    - `title` string, nullable — The file name
    - `creation` string, date-time, nullable — The date and time that the file attachment was first created
    - `id` string, nullable — ID of the FHIR element (optional)
  - `text` FhirNarrative
    - `status` 'generated' | 'extensions' | 'additional' | 'empty' — Describes how the narrative was generated
    - `div` string — Limited xhtml content
    - `id` string, nullable — ID of the FHIR element (optional)
  - `contained` AbstractFhirResource[] — Contained, inline Resources
    - `id` string, nullable — Logical id of this artifact
    - `meta` FhirResourceMeta
      - `lastUpdated` string, date-time, nullable — When the resource version last changed
      - `profile` string[] — Profiles this resource claims to conform to
    - `resourceType` string, nullable — Resource Type
  - `id` string, nullable — The patient ID in the practice group
  - `meta` FhirResourceMeta
    - `lastUpdated` string, date-time, nullable — When the resource version last changed
    - `profile` string[] — Profiles this resource claims to conform to
  - `resourceType` string, nullable — Resource Type

## Other responses

- `400` — Invalid input
- `403` — Forbidden
- `404` — Resource not found
- `422` — Unprocessable entity

---

[API](https://skmtc.dev/halaxy/apis/halaxy-api.md) · [All operations](https://skmtc.dev/halaxy/apis/halaxy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/halaxy/halaxy-api/revisions/d72139daaa89/schema)
