Skip to Content

Clinic Forms API

Endpoints for managing forms and consents within the clinic system.

Consents

List Consents

Get a list of consent forms.

Endpoint: GET /v1/clinic/forms/consents
Authentication: Required

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination
page_sizeintegerNoNumber of items per page
patient_idintegerNoFilter by patient ID
form_typestringNoFilter by consent form type
statusstringNoFilter by consent status

Example Request

GET /v1/clinic/forms/consents?patient_id=1049&status=signed HTTP/1.1 Content-Type: application/json X-User-Token: your_token_here

Endpoint: POST /v1/clinic/forms/consents
Authentication: Required

Request Body Parameters

ParameterTypeRequiredDescription
consentobjectYesConsent data object
consent.patient_idintegerYesID of the patient
consent.form_typestringYesType of consent form
consent.contentstringYesConsent form content
consent.signaturestringNoBase64 encoded signature
consent.signed_atstringNoDate/time when signed (ISO 8601)
consent.witness_signaturestringNoBase64 encoded witness signature
consent.witness_namestringNoName of the witness

Example Request

POST /v1/clinic/forms/consents HTTP/1.1 Content-Type: application/json X-User-Token: your_token_here { "consent": { "patient_id": 1049, "form_type": "treatment_consent", "content": "I consent to the proposed treatment plan...", "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34...", "signed_at": "2023-10-27T14:30:00.000Z", "witness_name": "Dr. Smith" } }

Response Format

{ "id": 123, "patient_id": 1049, "form_type": "treatment_consent", "content": "I consent to the proposed treatment plan...", "status": "signed", "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34...", "signed_at": "2023-10-27T14:30:00.000Z", "witness_signature": null, "witness_name": "Dr. Smith", "created_at": "2023-10-20T10:00:00.000Z", "updated_at": "2023-10-27T14:30:00.000Z" }

Form Types

Common consent form types include:

  • treatment_consent - General treatment consent
  • medication_consent - Consent for medication administration
  • telehealth_consent - Consent for telehealth services
  • privacy_consent - HIPAA privacy consent
  • research_consent - Consent for research participation
  • minor_consent - Consent for treatment of minors
  • draft - Consent form created but not yet signed
  • pending - Consent form sent to patient for signature
  • signed - Consent form has been signed by patient
  • expired - Consent form has expired and needs renewal
  • revoked - Consent has been revoked by patient

Error Responses

422 Unprocessable Entity

{ "errors": { "patient_id": ["can't be blank"], "form_type": ["is not included in the list"], "content": ["can't be blank"] } }

404 Not Found

{ "errors": "Consent form not found" }

403 Forbidden

{ "errors": "You are not authorized to access this consent form" }

Notes

  • Signatures should be provided as base64 encoded PNG images with the data:image/png;base64, prefix
  • The signed_at field should be in ISO 8601 format
  • Consent forms may require witness signatures depending on the form type and local regulations
  • Some consent forms may have expiration dates and require periodic renewal
  • Patient consent is required before accessing or sharing protected health information