imednet.form_designer.client module
- class imednet.form_designer.client.FormDesignerClient(base_url, phpsessid, timeout=30.0)[source]
Bases:
objectClient for the iMedNet Form Designer endpoint.
Handles the specific authentication and payload requirements of the legacy formdez_save.php endpoint.
- Parameters:
base_url (str) –
phpsessid (str) –
timeout (float) –
- save_form(csrf_key, form_id, community_id, revision, layout)[source]
Submit the form layout to the server.
- Parameters:
csrf_key (
str) – The CSRF token (scraped from page).form_id (
int) – The ID of the form being edited.community_id (
int) – The study ID.revision (
int) – The NEXT revision number.layout (
ProtocolDeviationFormPayload) – The Form Layout object.
- Return type:
str- Returns:
The raw response text from the server.
- Raises:
httpx.HTTPStatusError – If the server returns a non-2xx status code.
ValueError – If the server returns an error.