create_blank_form
ChatGPTCreate a new blank SafeForm patient questionnaire draft when the user wants a custom questionnaire that is not based on an existing template (e.g. medical questionnaire, pre-consultation / intake form, anamnesis, follow-up questionnaire). This only creates the draft container — it does not add questions. After creation, call set_form_fields with the questions. Does not publish. title is the internal dashboard name; the patient-facing title defaults to title (centered) unless form_title is provided. Optional form_subtitle sets the patient subtitle. No separate update_form_meta call is required after creation for the patient title. If a library template already fits, prefer list_templates then create_form_from_template. Returns form_id for chaining.
create_form_from_template
ChatGPTCreate a new draft SafeForm patient questionnaire from a SafeForm Bibliothèque model (same catalog and same result as Bibliothèque → Utiliser ce modèle). Use after list_templates when a model was chosen or clearly matches the need. template_id is the slug returned by list_templates (e.g. "dn4", "phq-9"). Creates a draft only — does not publish. For a fully custom questionnaire with no library model, use create_blank_form then set_form_fields. Returns form_id for further edits.
duplicate_form
ChatGPTCreate an independent draft copy of an existing SafeForm questionnaire belonging to the user (structure only). Patient responses are never copied. The copy stays unpublished. Optional title sets the internal title of the new draft; if omitted, the source questionnaire title is kept as-is (do not append “(Copy)” or “(Copie)”). Use when the user wants to reuse an existing questionnaire as a starting point. For a library template, prefer create_form_from_template. Returns form_id of the new draft.
get_form_structure
ChatGPTRead the full structure of an existing SafeForm patient questionnaire: metadata, settings, questions/fields (types, options, logic), and logic rules. Use this before editing an existing questionnaire so you do not overwrite questions accidentally with set_form_fields. Never returns patient submissions or medical answers. For only the patient share/embed URL of a published questionnaire, prefer get_share_link.
get_share_link
ChatGPTGet sharing URLs for a SafeForm patient questionnaire. Returns editor_url always. Returns share_url and embed_url only when the questionnaire is already published. If it is still a draft, share_url and embed_url are null and next_step explains that the healthcare professional must review and publish in SafeForm — do not invent a public patient link. Use after you know form_id. Does not return patient responses.
list_my_forms
ChatGPTList the healthcare professional’s existing SafeForm patient questionnaires (drafts and published), including title, status, field count, and editor URL. Use this when the user wants to find, review, modify, duplicate, or share an existing questionnaire, or when you need a form_id. Does not return any patient responses or medical answers. Do not use this to invent a new questionnaire — use create_blank_form or create_form_from_template instead.
list_templates
ChatGPTList models from the SafeForm Bibliothèque (shared clinical catalog: PHQ-9, GAD-7, DN4, Oswestry, etc.). Each item id is the model slug (e.g. "dn4", "phq-9"). Use when the user wants to start from a library model or a model may match the request. Do not force a template for every creation — a custom medical, pre-consultation, intake, anamnesis, or follow-up questionnaire can go straight to create_blank_form. Call this before create_form_from_template.
set_form_fields
ChatGPTDefine or replace the full ordered list of questions/fields on a SafeForm patient questionnaire (text, single/multiple choice, image-choice visual grid for postural or physiotherapy assessments, dates, scores, section headings, etc.). The provided fields array REPLACES the current field list entirely — call get_form_structure first when editing an existing questionnaire to avoid wiping questions. After create_blank_form, call this next to add questions. Supports required flags, choice options (including points for scoring), score fields with scoreConfig, and image-choice options { label, imageUrl?, points? }. Use single-checkbox only for consent/acceptance/attestation (set placeholder as the text beside the box); for explicit Yes/No answers prefer radio-round with Oui/Non. Does not publish — the healthcare professional must review and publish in SafeForm. Never reads or writes patient responses.
update_form_meta
ChatGPTUpdate general metadata of an existing SafeForm questionnaire only: internal title/description, patient-facing form title/subtitle, and title alignment. Do not use this to change questions — use set_form_fields for questions. Does not publish and does not access patient responses.