api-patient-create.patient-create¶
Service to create a patient.
This class provides a method to create a patient in the system based on the information provided in the request.
Channel /patient/{version}/create.
- This class creates a patient with the following steps:
Check if the patient exists in the system based on their email address
Create a ResourceOwner in the system
Create a Person resource or update an existing one with a Patient resource
TODO : Create a ListSubscription resource if the request contains one
Create a ProcessingBasis resource for the Person created
TODO : Record an interaction and engagement event in the data warehouse
- Returns:
- HTTP status code:
201: If the patient was created successfully
400: If the input data are not valid
403: If the patient already exists
500: If an error occurred while creating the patient
- JSON: payload with the Person object
person (Person)
Input¶
Name |
Datatype |
Required |
Description |
|---|---|---|---|
list_subscription |
ListSubscription |
Yes |
— |
patient |
Patient |
Yes |
— |
processing_basis |
ProcessingBasis |
Yes |
WARNING : URI have to be authorized by keycloak to work |
resource_owner |
ResourceOwner |
Yes |
— |
resource_owner_email_verify_redirect_uri |
string |
— |
— |
Output¶
Name |
Datatype |
Required |
Description |
|---|---|---|---|
identifier |
PersonIdentifierSlices |
Yes |
— |
telecom |
PersonTelecomSlices |
Yes |
— |
active |
boolean |
— |
— |
address |
Address |
— |
— |
birth_date |
string |
— |
gender: optional[GenderEnum] |
communication |
CommunicationLanguage |
— |
— |
created |
string |
— |
— |
deceased |
string |
— |
— |
extension |
PersonExtension |
— |
— |
link |
PersonLinkSlices |
— |
— |
managing_organization |
Organization |
— |
— |
name |
HumanName |
— |
— |
photo |
Attachment |
— |
marital_status: optional[MaritalStatusEnum] |
updated |
string |
— |
— |