Medication

A medication is a self-reported substance used by patients for medical treatment.

The medication model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the medication.

  • Name
    object
    Type
    string
    Description

    Always 'medication'.

  • Name
    patient
    Type
    string
    Description

    Patient this medication is for.

  • Name
    name
    Type
    string
    Description

    Name of the medication.

  • Name
    dosage
    Type
    string
    Description

    Dosage of the medication.

  • Name
    sig
    Type
    string
    Description

    Instructions on how to take the medication.

  • Name
    active
    Type
    boolean
    Description

    Whether this medication is still active.

  • Name
    start_date
    Type
    date
    Description

    Start date (in ISO 8601 format) of the medication.

  • Name
    end_date
    Type
    date
    Description

    Only applies if medication is not active. End date (in ISO 8601 format) of the medication.

  • Name
    comment
    Type
    string
    Description

    Any comments associated with the medication.

  • Name
    created_by
    Type
    string
    Description

    Creator of the medication.

  • Name
    created_at
    Type
    date-time
    Description

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

  • Name
    last_updated_at
    Type
    date-time
    Description

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

Response

{
    "id": "med_2UxtAULYUrX7GVsTKePy",
    "object": "medication",
    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

    "name": "VIIBRYD (Oral Pill)",
    "dosage": "10 mg",
    "sig": "Take 1 tablet by mouth daily",
    "active": true,
    "start_date": "2022-05-28",
    "comment": "Medication makes her nauseous.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2022-05-28T00:00:00Z",
    "last_updated_at": "2022-05-28T00:00:00Z"
}


POST/v2/medications

Create a medication

Creates a new medication.

Required attributes

  • Name
    patient
    Type
    string
    Description

    Patient this medication is for.

  • Name
    name
    Type
    string
    Description

    Name of the medication.

  • Name
    dosage
    Type
    string
    Description

    Dosage of the medication.

  • Name
    sig
    Type
    string
    Description

    Instructions on how to take the medication.

  • Name
    active
    Type
    boolean
    Description

    Whether this medication is still active.

  • Name
    start_date
    Type
    date
    Description

    Start date (in ISO 8601 format) of the medication.

  • Name
    end_date
    Type
    date
    Description

    Only applies if medication is not active. End date (in ISO 8601 format) of the medication.

Optional attributes

  • Name
    comment
    Type
    string
    Description

    Any comments associated with the medication.

Response

{
    "id": "med_2UxtAULYUrX7GVsTKePy",
    "object": "medication",
    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

    "name": "VIIBRYD (Oral Pill)",
    "dosage": "10 mg",
    "sig": "Take 1 tablet by mouth daily",
    "active": true,
    "start_date": "2022-05-28",
    "comment": "Medication makes her nauseous.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2022-05-28T00:00:00Z",
    "last_updated_at": "2022-05-28T00:00:00Z"
}



GET/v2/medications/:id

Retrieve a medication

Retrieves the specified medication.

Response

{
   "id": "med_2UxtAULYUrX7GVsTKePy",
   "object": "medication",
   "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

   "name": "VIIBRYD (Oral Pill)",
   "dosage": "10 mg",
   "sig": "Take 1 tablet by mouth daily",
   "active": true,
   "start_date": "2022-05-28",
   "comment": "Medication makes her nauseous.",

   "created_by": "user_xeDpGyt67wTor93qKtS7",
   "created_at": "2022-05-28T00:00:00Z",
   "last_updated_at": "2022-05-28T00:00:00Z"
}



POST/v2/medications/:id

Update a medication

Updates the specified medication 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 the medication.

    • Name
      dosage
      Type
      string
      Description

      Dosage of the medication.

    • Name
      sig
      Type
      string
      Description

      Instructions on how to take the medication.

    • Name
      active
      Type
      boolean
      Description

      Whether this medication is still active.

    • Name
      start_date
      Type
      date
      Description

      Start date (in ISO 8601 format) of the medication.

    • Name
      end_date
      Type
      date
      Description

      Only applies if medication is not active. End date (in ISO 8601 format) of the medication.

    • Name
      comment
      Type
      string
      Description

      Any comments associated with the medication.

    Response

    
    {
        "id": "med_2UxtAULYUrX7GVsTKePy",
        "object": "medication",
        "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
        "name": "VIIBRYD (Oral Pill)",
        "dosage": "10 mg",
        "sig": "Take 1 tablet by mouth daily",
        "active": true,
        "start_date": "2022-05-28",
        "comment": "Medication makes her nauseous.",
    
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": "2022-05-28T00:00:00Z",
        "last_updated_at": "2022-05-28T00:00:00Z"
    }
    
    

    GET/v2/medications

    List all medications

    Returns a list of all medications.

    Response

    {
      "object": "list",
      "data": [
        {
            "id": "med_2UxtAULYUrX7GVsTKePy",
            "object": "medication",
            "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
            "name": "VIIBRYD (Oral Pill)",
            "dosage": "10 mg",
            "sig": "Take 1 tablet by mouth daily",
            "active": true,
            "start_date": "2022-05-28",
            "comment": "Medication makes her nauseous.",
    
            "created_by": "user_xeDpGyt67wTor93qKtS7",
            "created_at": "2022-05-28T00:00:00Z",
            "last_updated_at": "2022-05-28T00:00:00Z"
        },
      ]
    }
    

    DELETE/v2/medications/:id

    Delete a medication

    Deletes the specified medication.

    Required attributes

      Optional attributes

        Response

        {
            "id": "med_2UxtAULYUrX7GVsTKePy",
            "object": "medication",
            "delete": true
        }