dietbox_patient_write_create
Create or update patients in Dietbox. Actions: create (Name required, uses POST), update (partial fields, uses PATCH — no need to send all fields). Gender: Masculino or Feminino (converted to boolean for the API). Observation field for notes. Endereço, dados civis e de acesso (Address, Number, Complement, Neighborhood, State, City, Cep, MaritalStatus, Occupancy, Expire) são suportados em create e update — use os mesmos nomes de campo retornados pelo dietbox_patient (get); o adapter mapeia internamente a divergência de nomes do endpoint de update.
Phone / MobilePhone são normalizados automaticamente para E.164 em create e update (o endpoint update/PATCH /patients rejeita HTTP 400 "'Body Mobile Phone Value' is not in format 'E.164'" quando recebe número sem prefixo internacional). Envie "67991234567", "(67) 99123-4567" ou "+5567991234567" indistintamente — o adapter ajusta para "+5567991234567" antes de chamar a API. Para números não-brasileiros, envie já com "+{código}".
For destructive removal use dietbox_patient_delete.
[Flattened action: create]
Bulk support: accepts patient_ids for batched execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Cep | No | ||
| Cpf | No | ||
| City | No | ||
| Name | No | ||
| No | |||
| Phone | No | ||
| State | No | ||
| Expire | No | ||
| Gender | No | ||
| Number | No | ||
| Address | No | ||
| account | No | ||
| Birthday | No | ||
| IsActive | No | ||
| Occupancy | No | ||
| Complement | No | ||
| patient_id | No | ||
| MobilePhone | No | ||
| Observation | No | ||
| patient_ids | No | ||
| Neighborhood | No | ||
| MaritalStatus | No |