webdiet_manipulados_write_send
Create / send / publish / duplicate manipulados in WebDiet. Actions:
save → create or update a manipulado for a patient. texto = raw HTML (tinyMCE content), nome = formula name. Omit manipulado_id to create; pass it to update an existing one. Returns id and pdf_url.
send → SHORTCUT prescribir + publicar: copia uma ou mais fórmulas do banco (por nome exato vindo de webdiet_manipulados list_banco) para o paciente como manipulados novos. Já fica liberado=true (visível no app/portal do paciente) imediatamente. Skips fórmulas bloqueadas com mensagem de erro.
publish → toggle liberar/disponibilizar status (makes the formula visible/invisible on the patient portal/app). Server toggles and returns the NEW state.
duplicate → duplicate an existing manipulado (creates a copy "(cópia)").
For destructive delete use webdiet_manipulados_delete.
[Flattened action: send]
Bulk support: accepts patient_ids, manipulado_ids for batched execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nome | No | ||
| nomes | No | ||
| texto | No | ||
| account | No | ||
| patient_id | Yes | ||
| patient_ids | No | ||
| manipulado_id | No | ||
| manipulado_ids | No |