Create a Patient

POST {{url}}/{{tenantName}}/{{instanceName}}/patients

Creating a new Patient in Welkin involves making a POST request to the Patient Collection resource.

HTTP URL: https://api.live.welkincloud.io/gh/sb-demo/patients

HTTP Response Codes:

  • 201: Successfully created a new patient
  • 400: Bad request - the request could not be understood or was missing required parameters
  • 500: Internal server error - something went wrong on the server

Notes:

  1. patientTerritories: This field should contain valid territories that have been previously set up in the Designer. If you don't have the territories information at the time of creating a patient, you can omit this field and update it later.
  2. careTeam: All members listed in the careTeam must be valid users. One member should be designated as the point of contact by setting "pointOfContact": True. If no one is explicitly marked, the system will automatically assign the first user listed in the careTeam as the point of contact. If you don't have the care team information at the time of creating a patient, you can omit this field and update it later.
  3. phone: when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero example for Australia: +61403211111 correct phone format +610403211111 incorrect phone format

Request Body

{"firstName"=>"patientName", "lastName"=>"patientLastName", "externalGuid"=>"c4c63e1f-8117-4393-bcdf-399a458f012e", "birthDate"=>"2021-01-13T00:00:00.000Z", "email"=>"test@test.test", "phone"=>"+38099648178", "country"=>"5", "state"=>"Alabama", "city"=>"4", "zip"=>"3", "addressLine1"=>"1", "addressLine2"=>"2", "timezone"=>"UTC", "patientTerritories"=>[{"name"=>"washington", "territories"=>["Seattle"]}], "careTeam"=>[{"id"=>"20eb246e-8099-4c7c-854c-5e0f9a366ddb", "pointOfContact"=>true}, {"id"=>"03a87f5b-3a04-4be8-b0ad-7a34a5b2892d", "pointOfContact"=>false}]}