Form

A form is a method to capture information from patients. Providers, support team members, and caregivers can also take forms on behalf of patients.

The form model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the form.

  • Name
    object
    Type
    string
    Description

    Always 'form'.

  • Name
    name
    Type
    string
    Description

    Name of form.

  • Name
    description
    Type
    string
    Description

    Description of form.

  • Name
    published_version
    Type
    string
    Description

    Form version that is currently published. This is the form version that is shown to the patient when they take the form.

  • Name
    latest_version
    Type
    string
    Description

    The latest form version. This is the form version that the admin will be viewing when they go to the form builder in the Avon EMR. When the "publish" button is pressed in the Avon EMR UI or the /publish endpoint is called in the Avon API, the latest version will become the published version.

  • Name
    has_unpublished_changes
    Type
    boolean
    Description

    If there are any changes in the 'form.latest_version' that are not in 'form.published_version.' If false, the contents of 'form.published_version' and 'form.latest_version' are the same.

  • Name
    usable_by
    Type
    object
    Description
    Who can use this form.
  • Name
    request_completion_from
    Type
    object
    Description
    Patients to request to request completion of this form. When a patient is added to this list, they will see the form in their patient portal. Once the patient has completed the form, their name will be automatically be removed from the 'form.request_completion_form' list. After a patient has completed a form, they can be re-requested to take a form.
  • Name
    created_by
    Type
    string
    Description

    Creator of the form.

  • Name
    created_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the form was created.

  • Name
    last_updated_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the form was last updated.

Response

{
    "id": "form_NOIYLBGOBNhSwTWCUzfu",
    "object": "form",
    "name": "Release of Medical Information",
    "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
    "published_version": "fver_1JtjV1QEY84Fv395Hl7h",
    "latest_version": "fver_93tjV1QEY84Fv395Hl7h",
    "has_unpublished_changes": true,
    "usable_by": {
        "usable_by_all": false,
        "usable_by": {
            "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
            "specializations": [],
            "peer_groups": [],
            "individuals": []
        }
    },
    "request_completion_from": [{
        "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
        "requested_by": "user_xeDpGyt67wTor93qKtS7",
        "requested_at": "2024-04-10T13:20:21.724Z"
    }],
    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2024-04-10T13:20:21.724Z",
    "last_updated_at": "2024-04-10T13:20:21.724Z"
}


POST/v2/form

Create a form

Creates a new form and an unpublished form version.

Required attributes

  • Name
    name
    Type
    string
    Description

    Name of form.

Optional attributes

  • Name
    description
    Type
    string
    Description

    Description of form.

  • Name
    usable_by
    Type
    object
    Description
    Defaults to usable by all. Who can use this form.

Response

 {
    "id": "form_NOIYLBGOBNhSwTWCUzfu",
    "object": "form",
    "name": "Release of Medical Information",
    "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
    "published_version": "",
    "latest_version": "",
    "has_unpublished_changes": false,
    "usable_by": {
        "usable_by_all": false,
        "usable_by": {
            "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
            "specializations": [],
            "peer_groups": [],
            "individuals": []
        }
    },
    "request_completion_from": [],
    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2024-04-10T13:20:21.724Z",
    "last_updated_at": "2024-04-10T13:20:21.724Z"
}


GET/v2/forms/:id

Retrieve a form

Retrieves the specified form.

Response


{
   "id": "form_NOIYLBGOBNhSwTWCUzfu",
   "object": "form",
   "name": "Release of Medical Information",
   "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
   "published_version": "fver_1JtjV1QEY84Fv395Hl7h",
   "latest_version": "fver_93tjV1QEY84Fv395Hl7h",
   "has_unpublished_changes": true,
   "usable_by": {
       "usable_by_all": false,
       "usable_by": {
           "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
           "specializations": [],
           "peer_groups": [],
           "individuals": []
       }
   },
   "request_completion_from": [{
       "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
       "requested_by": "user_xeDpGyt67wTor93qKtS7",
       "requested_at": "2024-04-10T13:20:21.724Z"
   }],
   "created_by": "user_xeDpGyt67wTor93qKtS7",
   "created_at": "2024-04-10T13:20:21.724Z",
   "last_updated_at": "2024-04-10T13:20:21.724Z"
}


POST/v2/forms/:id

Update a form

Updates the specified form object by setting the values of the parameters passed. Any other parameters not provided will not be modified.

Required attributes

    Optional attributes

    • Name
      name
      Type
      string
      Description

      Name of form.

    • Name
      description
      Type
      string
      Description

      Description of form.

    • Name
      has_unpublished_changes
      Type
      boolean
      Description

      If there are any changes in the 'form.latest_version' that are not in 'form.published_version.' If false, the contents of 'form.published_version' and 'form.latest_version' are the same.

    • Name
      usable_by
      Type
      object
      Description
      Who can use this form.
    • Name
      request_completion_from
      Type
      object
      Description
      Patients to request to request completion of this form. When a patient is added to this list, they will see the form in their patient portal. Once the patient has completed the form, their name will be automatically be removed from the 'form.request_completion_form' list. After a patient has completed a form, they can be re-requested to take a form.

    Response

    
    {
        "id": "form_NOIYLBGOBNhSwTWCUzfu",
        "object": "form",
        "name": "Release of Medical Information",
        "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
        "published_version": "fver_1JtjV1QEY84Fv395Hl7h",
        "latest_version": "fver_93tjV1QEY84Fv395Hl7h",
        "has_unpublished_changes": true,
        "usable_by": {
            "usable_by_all": false,
            "usable_by": {
                "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
                "specializations": [],
                "peer_groups": [],
                "individuals": []
            }
        },
        "request_completion_from": [{
            "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
            "requested_by": "user_xeDpGyt67wTor93qKtS7",
            "requested_at": "2024-04-10T13:20:21.724Z"
        }],
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": "2024-04-10T13:20:21.724Z",
        "last_updated_at": "2024-04-10T13:20:21.724Z"
    }
    
    

    POST/v2/forms/:id/publish

    Publish a form

    Publishs the latest version of the specified form by moving the form version in 'latest_version' to 'published_version' and creating a new form version in 'latest_version' that is a copy of the form version in 'published_version'.

    Required attributes

      Optional attributes

        Response

        
        {
            "id": "form_NOIYLBGOBNhSwTWCUzfu",
            "object": "form",
            "name": "Release of Medical Information",
            "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
            "published_version": "fver_93tjV1QEY84Fv395Hl7h",
            "latest_version": "fver_009V1QEY84Fv395Hl7h",
            "has_unpublished_changes": true,
            "usable_by": {
                "usable_by_all": false,
                "usable_by": {
                    "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
                    "specializations": [],
                    "peer_groups": [],
                    "individuals": []
                }
            },
            "request_completion_from": [{
                "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
                "requested_by": "user_xeDpGyt67wTor93qKtS7",
                "requested_at": "2024-04-10T13:20:21.724Z"
            }],
            "created_by": "user_xeDpGyt67wTor93qKtS7",
            "created_at": "2024-04-10T13:20:21.724Z",
            "last_updated_at": "2024-04-10T13:20:21.724Z"
        }
        
        

        GET/v2/forms

        List all forms

        Returns a list of all forms.

        Response

        {
          "object": "list",
          "data": [
            {
                "id": "form_NOIYLBGOBNhSwTWCUzfu",
                "object": "form",
                "name": "Release of Medical Information",
                "description": "This form allows us to collect consent from patients to retrieve their medical information from other providers.",
                "published_version": "fver_1JtjV1QEY84Fv395Hl7h",
                "latest_version": "fver_93tjV1QEY84Fv395Hl7h",
                "has_unpublished_changes": true,
                "usable_by": {
                    "usable_by_all": false,
                    "usable_by": {
                        "medical_centers":["mctr_XbvBirnEb1Mli1OLwqnM"],
                        "specializations": [],
                        "peer_groups": [],
                        "individuals": []
                    }
                },
                "request_completion_from": [{
                    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
                    "requested_by": "user_xeDpGyt67wTor93qKtS7",
                    "requested_at": "2024-04-10T13:20:21.724Z"
                }],
                "created_by": "user_xeDpGyt67wTor93qKtS7",
                "created_at": "2024-04-10T13:20:21.724Z",
                "last_updated_at": "2024-04-10T13:20:21.724Z"
            },
          ]
        }
        

        DELETE/v2/forms/:id

        Delete a form

        Deletes the specified form.

        Required attributes

          Optional attributes

            Response

            {
                "id": "form_NOIYLBGOBNhSwTWCUzfu",
                "object": "form",
                "delete": true
            }