NAV
shell ruby
  • Introduction
  • Authentication
  • Scheduling A Visit
  • Webhooks
  • Patient Assessments
  • Entities
  • Response Codes
  • Introduction

    Elevate your healthcare experience with MDLIVE's comprehensive API.

    Crafted to redefine telehealth, we offer unparalleled solutions exclusively for consumers across the United States.

    Authentication

    MDLIVE uses JWT Web Tokens to allow access to our API endpoints.

    We grant two types of tokens. The type needed depends on the endpoints that you would like to access.

    Endpoints that: Can use:
    do not require a patient id API token
    require a patient id User token
    # With shell, you can just pass the correct header with each request
    curl "api_endpoint_here"
      -H "Authorization: Bearer {jwt_token}"
    
    # With ruby, you can can add correct header to the request object
    RestClient::Request.new(
      :method => :get,
      :url => "sample_url",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}'
      }
    ).execute
    

    Make sure to replace {jwt_token} with your JWT Token.

    MDLIVE expects for the token to be included in all API requests to the server in a header that looks like the following:

    Authorization: Bearer {jwt_token}

    API Tokens

    curl -X POST {server_url}/auth/auth_token
    -H "Content-type: application/json"
    -d '{"auth":{"api_key":"yourapikey","password":"yourapipassword"}}'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/auth/auth_token",
      :headers => {
        "Content-type" => "application/json"
      },
      :payload => {
        :auth => {
          :api_key => "yourapikey",
          :password => "yourapipassword"
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
        "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MDgyNjk2NjQsImF1ZCI6ZmFsc2UsInN1YiI6MX0._gJkRKLkdqwFUviwQw3xT1gP3qA4p2DVfwSana5Celc"
    }
    

    To obtain an API JWT Token

    HTTP Request

    POST {server_url}/auth/auth_token

    Header Parameter

    Parameter Default
    Content-type application/json

    Request Body

    Attribute Required Description
    auth true parent attribute of api_key and password
    ↳ api_key true Unique key assigned to you by your account manager
    ↳ password true Unique password assigned to key by your account manager

    User Tokens

    curl -X POST {server_url}/api/v1/sso_auth/auth_token
    -H "Content-type: application/json"
    -d '{ "auth": {
             "first_name": "firstname",
             "last_name": "lastname",
             "gender": "M",
             "birthdate": "1960-12-31",
             "subscriber_id": "subscriberid",
             "member_id": "memberid",
             "phone": "555-555-5555",
             "email": "some@email.com",
             "address1": "address1",
             "address2": "address2",
             "city": "Sunrise",
             "state": "FL",
             "zip": "33303",
             "relationship": "Self",
             "primary_first_name": "",
             "primary_last_name": "",
             "primary_gender": "",
             "primary_birthdate": "",
             "primary_subscriber_id": "",
             "primary_member_id": "",
             "primary_address1": "",
             "primary_address2": "",
             "primary_city": "",
             "primary_state": "",
             "primary_zip": ""
           },
           "org": {
             "ou": "ou",
             "request_timestamp": "1509727623.5845659",
             "enterprise_hash": "YTBmNjVlNzFlODJlNmU3ZGQ5NjZlZDExODlhYTE2MDhmZWY4NDVmYTQ0ZmZkMmI0NzFlOGMyMWQ4ZWM3N2FjZg=="
           },
           "api": {
             "api_key": "my_api_key",
             "password": "my_password"
           }
         }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/sso_auth/auth_token",
      :headers => {
        "Content-type" => "application/json"
      },
      :payload => {
          "auth" => {
            "first_name" => "firstname",
            "last_name" => "lastname",
            "gender" => "M",
            "birthdate" => "1960-12-31",
            "subscriber_id" => "subscriberid",
            "member_id" => "memberid",
            "phone" => "555-555-5555",
            "email" => "some@email.com",
            "address1" => "address1",
            "address2" => "address2",
            "city" => "Sunrise",
            "state" => "FL",
            "zip" => "33303",
            "relationship" => "Self",
            "primary_first_name" => "",
            "primary_last_name" => "",
            "primary_gender" => "",
            "primary_birthdate" => "",
            "primary_subscriber_id" => "",
            "primary_member_id" => "",
            "primary_address1" => "",
            "primary_address2" => "",
            "primary_city" => "",
            "primary_state" => "",
            "primary_zip" => ""
          },
          "org" => {
            "ou" => "ou",
            "request_timestamp" => "1509727623.5845659",
            "enterprise_hash" => "YTBmNjVlNzFlODJlNmU3ZGQ5NjZlZDExODlhYTE2MDhmZWY4NDVmYTQ0ZmZkMmI0NzFlOGMyMWQ4ZWM3N2FjZg=="
          },
          "api" => {
            "api_key" => "my_api_key",
            "password" => "my_password"
          }
      }
    ).execute
    

    Enterprise hash offers a higher level of security against the requests being replayed by a third party by limiting the time a request is valid to five minutes. To set up a shared secret key, please reach out to your Account Manager.

    The above command returns JSON structured like this:

    {
      "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyaWQiOjUyLCJ1c2VybmFtZSI6ImRlbW9wYXRpZW50MSIsInByaW1hcnlfYWN0aW5nX2FzX2FnZW50IjpmYWxzZSwiZGV2aWNlX29zIjoiQW5kcm9pZCIsImFwcF9pZCI6Ik1ETElWRSIsImFwcF92ZXJzaW9uIjoiMTA1MSIsImFwaV9jcmVkX2lkIjoxLCJleHAiOjE1MDgzNTM5MTF9.orRpY5qV6f7NVAmOIX9-ZB92U-omf_rVjLZ6IyVxfU0",
      "user": {
        "id": 52,
        "type": "Patient",
        "time_to_live_minutes": 60
      }
    }
    

    To obtain an API JWT Token for a user

    HTTP Request

    POST {server_url}/api/v1/sso_auth/auth_token

    Header Parameter

    Parameter Default
    Content-type application/json

    Request Body

    Attribute Required Description
    auth true parent attribute specifying user information to update or create in MDLIVE
    ↳ first_name true User's first name
    ↳ last_name true User's last name
    ↳ gender true User's gender, specified as 'M' for male, 'F' for female, 'U' for non-binary
    ↳ birthdate true User's birthdate, specified as year-month-day
    ↳ subscriber_id true User's subscriber id
    ↳ member_id false user's member id
    ↳ phone true User's contact phone number
    ↳ email true User's email address
    ↳ address1 true First line of user's mailing address
    ↳ address2 false Second line of user's mailing address, if needed
    ↳ city true City of user's mailing address
    ↳ state true State of user's mailing address
    ↳ zip true Zip code of user's mailing address
    ↳ relationship true Relationship of user to primary account holder. Specified as either 'Self', 'Spouse', 'Child', or 'Other Adult'
    ↳ primary_first_name false First name of primary account holder, if user is not primary
    ↳ primary_last_name false Last name of primary account holder, if user is not primary
    ↳ primary_gender false Gender of primary account holder, if user is not primary, specified as 'M' for male, 'F' for female, 'U' for non-binary
    ↳ primary_birthdate false Birthdate of primary account holder, if user is not primary, specified as day-month-year
    ↳ primary_subscriber_id false Subscriber id of primary account holder, if user is not primary
    ↳ primary_member_id false Member id of primary account holder, if user is not primary
    ↳ primary_address1 false First line of mailing address for primary account holder, if user is not primary
    ↳ primary_address2 false Second line of mailing address for primary account holder, if user is not primary
    ↳ primary_city false City of mailing address for primary account holder, if user is not primary
    ↳ primary_state false State of mailing address for primary account holder, if user is not primary
    ↳ primary_zip false Zip code of mailing address for primary account holder, if user is not primary
    org true parent attribute for calling organizational information
    ↳ ou true Organizational unit identifier assigned by MDLIVE
    ↳ request_timestamp false Timestamp of request, specified as floating point number of seconds since the Epoch
    ↳ enterprise_hash false Base64 encoded SHA-256 digest of memberid, request_timestamp, and a shared secret digest key
    api true parent attribute of api_key and password
    ↳ api_key true Unique key assigned to you by your account manager
    ↳ password true Unique password assigned to key by your account manager

    Extending time on User Tokens

    curl -X POST {server_url}/api/v1/sso_auth/auth_extend
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{
          "org": {
            "ou": "ou"
          },
          "api": {
            "api_key": "my_api_key",
            "password": "my_password"
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "#{server_url}/api/v1/sso_auth/auth_extend",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {
        "org": {
          "ou": "ou"
        },
        "api": {
          "api_key": "my_api_key",
          "password": "my_password"
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyaWQiOjUyLCJ1c2VybmFtZSI6ImRlbW9wYXRpZW50MSIsInByaW1hcnlfYWN0aW5nX2FzX2FnZW50IjpmYWxzZSwiZGV2aWNlX29zIjoiQW5kcm9pZCIsImFwcF9pZCI6Ik1ETElWRSIsImFwcF92ZXJzaW9uIjoiMTA1MSIsImFwaV9jcmVkX2lkIjoxLCJleHAiOjE1MDgzNTM5MTF9.orRpY5qV6f7NVAmOIX9-ZB92U-omf_rVjLZ6IyVxfU0",
      "user": {
        "id": 52,
        "type": "Patient",
        "time_to_live_minutes": 60
      }
    }
    

    The time to live for a JWT token is set at issue time, and returned in the response from initial User Token request. If that time to live is insufficient, another token can be requested by passing in a still valid token for that user.

    This request must include a valid User JWT token, please see our documentation

    To obtain an Extended API JWT Token for a user, use

    HTTP Request

    POST {server_url}/api/v1/sso_auth/auth_extend

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Request Body

    Attribute Required Description
    org true parent attribute for calling organizational information
    ↳ ou true Organizational unit identifier assigned by MDLIVE
    api true parent attribute of api_key and password
    ↳ api_key true Unique key assigned to you by your account manager
    ↳ password true Unique password assigned to key by your account manager

    Scheduling A Visit

    MDLIVE helps you schedule consultations for your users.

    You have the choice of scheduling the 3 types of consultations (video or phone) on MDLIVE:

    1. Future Appointment with a specific provider
    2. Immediate Consultation with a specific provider
    3. Consultation with the first available provider

    Please be aware that the type of consultation which can be requested is subject to the Provider's availability, the user's state of location, and the provider type the user wishes to see.

    To learn more about state restrictions, please see our states documentation.

    To learn more about provider type restrictions, please see our provider types documentation.

    Searching for Providers

    curl -X POST {server_url}/api/v2/patients/{patient_id}/providers/search
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-user-token"
      -H "Accept: application/json"
      -d '{ "search": {
               "state_abbrev": "FL",
               "language_id": 1
             }
          }'
    
    RestClient::Request.new(
      method: :post,
      url: "#{server_url}/api/v2/patients/#{patient_id}/providers/search",
      headers: {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
        "Accept" => "application/json"
      },
      payload: {
        search: {state_abbrev: "FL", language_id: 1}
      }
    ).execute
    

    The above command returns JSON structured like this:

    
    {
      "providers": [
        {
          "id": 542127369,
          "fullname": "Dr. Keylime Pie",
          "gender": "Female",
          "photo_url": null,
          "photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png",
          "specialty": "General Practice",
          "group_name": null,
          "is_visit_now_available": false,
          "status": "Available",
          "next_appt_available_date": "2017-11-09T13:45:00-05:00",
          "availability_type": null
        },
        {
          "id": 542114314,
          "fullname": "Dr. Test Amalie",
          "gender": "Male",
          "photo_url": null,
          "photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png",
          "specialty": "General Practice",
          "group_name": null,
          "is_visit_now_available": false,
          "status": "Available",
          "next_appt_available_date": "2017-11-09T13:45:00-05:00",
          "availability_type": null
        },
        {
          "id": 542117784,
          "fullname": "Dr. Andy Available",
          "gender": "Male",
          "photo_url": null,
          "photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png",
          "specialty": "General Practice",
          "group_name": null,
          "is_visit_now_available": false,
          "status": "Available",
          "next_appt_available_date": "2017-11-09T13:45:00-05:00",
          "availability_type": null
        }
      ],
      "refine_search_options": {
        "default_provider_types": [
          {
            "id": 3,
            "name": "Family Physician"
          },
          {
            "id": 5,
            "name": "Therapist"
          },
          {
            "id": 6,
            "name": "Psychiatrist"
          },
          {
            "id": 12,
            "name": "Dermatologist"
          }
        ],
        "availability_type": [
          "phone",
          "video"
        ]
      }
    }
    
    

    For medical appointments, you can schedule a visit with an available provider or see the first available doctor. To view a paginated list of available providers for a patient, make a request to:

    This request must include a valid User JWT token, please see our documentation

    HTTP Request

    POST {server_url}/api/v2/patients/{patient_id}/providers/search

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    per_page false # of providers per page
    page false Page #

    Request Body Parameters

    Attribute Type Required Description
    search_params object true Object with specific search filters
    ↳  state_abbrev string true 2 Letter state abbreviated, from the states list
    ↳  availability_type array of strings false Can be either ['phone'], ['video'], or ['phone', 'video']. Use to specify the preferred type of appointment for the patient
    ↳  gender string false Preferred provider gender (Male or Female)
    ↳  provider_type_id integer false Provider Type ID, from the provider types list (or the endpoint response)
    ↳  specific_date string false Date in YYYY-mm-dd format
    ↳  language_id integer false Language ID from the languages list (See Languages)

    Getting a Provider's Profile

    curl {server_url}/api/v2/providers/{provider_id}/profile?provider_type={provider_type}
    -H "Content-type: application/json"
    -H "Authorization: Bearer 34a2sample-user-token"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/providers/{provider_id}/profile}?provider_type={provider_type}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "provider_details": {
        "id": 4,
        "fullname": "Travis Stork",
        "gender": "Male",
        "city": "MIAMI BEACH",
        "state_abbrev": "FL",
        "phone": "3057997818",
        "photo_url": "/users/4/photo",
        "photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png",
        "years_in_practice": 15,
        "education": "Certified Nurse Educator",
        "about_me": "This is my profile description",
        "licenses": [
          {
            "state_id": 10,
            "state": "Florida"
          },
          {
            "state_id": 44,
            "state": "Texas"
          },
          {
            "state_id": 11,
            "state": "Georgia"
          }
        ],
        "languages": [
          {
            "id": 1,
            "name": "English",
            "alpha3_code": "eng"
          },
          {
            "id": 7,
            "name": "Polish",
            "alpha3_code": "pol"
          }
        ],
        "specialties": [
          {
            "id": 1,
            "name": "Abdominal Surgery",
            "code": "AS"
          },
          {
            "id": 51,
            "name": "General Practice",
            "code": "GP"
          }
        ],
        "publications": "Over 15 peer review publications in the field of emergency medicine and disaster medicine"
      },
      "availability_details": {
        "available_hours": [
          {
            "timeslot": "2018-01-10T15:00:00.000-05:00",
            "phys_availability_id": 6096481,
            "availability_type": [
              "video"
            ]
          },
          {
            "timeslot": "2018-01-10T15:30:00.000-05:00",
            "phys_availability_id": 6097008,
            "availability_type": [
              "phone"
            ]
          }
        ],
        "is_visit_now_available": false,
        "can_request_appointment": true,
        "appointment_date": "2018-01-15",
        "patient_appointment_types": [
          "video",
          "phone"
        ]
      }
    }
    

    After searching for available providers for a patient, the profile details for any provider selected by the patient are available. The profile will include details about the provider as well as the provider's latest scheduling availability information as it relates to the patient's preferred appointment.

    This request must include a valid JWT token, please see our documentation

    HTTP Request

    GET {server_url}/api/v2/providers/{provider_id}/profile

    Header Parameter

    Parameter Default Description
    Content-type application/json Expected content type, currently only JSON is supported
    Authorization Bearer {TOKEN} Auth Token, should be the string "Bearer {TOKEN}"

    URL Parameter

    Attribute Required Description
    provider_id true MDLIVE ID for provider

    Query String Parameters

    Attribute Required Description
    provider_type true Provider Type ID, from the provider types list (or the endpoint response). Use to specify the preferred doctor type for an appointment.
    patient_id false MDLIVE ID for patient scheduling a visit, use to specify patient only if the token provided is an API token instead of a User token
    availability_type false Can be either 'phone' or 'video', use to specify the preferred type of appointment for the patient
    specific_date false Date in YYYY-mm-dd format, use to specify a preferred date for an appointment. Default is today.
    show_next_availability false Can be either true or false. Default is true. When true, if specific_date is 'today' and the provider does not have any hours available, the available_hours array will contain information for the date the provider is next available. When false, if specific_date is 'today' and the provider does not have any hours available, available_hours will be an empty array.
    state_abbrev false Abbreviation of U.S. state, use to specify the preferred state for the appointment. Default is the patient's MDLIVE address.

    Billing the Appointment to Insurance

    While scheduling a visit, a patient can choose to use their insurance to pay for the appointment. In order to obtain access to this feature, a patient must be dtc_insurance_enabled (See the patient profile).

    To add an insurance payer, a patient must be eligible for telemedicine visits. Then, pass the authorize_insurance flag to check for cost with insurance. The authorize_insurance flag, along with the customer_insurance_id, must also be used when creating the appointment to indicate that the patient would like to bill the insurance matching the customer_insurance_id for the appointment.

    Scheduling a Consultation

    Regardless of the type of consultation that is being created, the endpoint called will be the same. The values of the request body parameters will determine the type of consultation created.

    HTTP Request

    POST {server}/api/v2/patients/{patient_id}/appointments

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwttoken}

    The following parameters are required when creating an appointment.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    appointment true parent attribute for the appointment
    ↳ provider_type_id true Requested doctor type for appointment, found in provider types list (or the endpoint response)
    ↳ state_abbrev true Requested U.S. state for the appointment
    ↳ survey_answer true Answer to survey question
    ↳ customer_call_in_number true Preferred phone number to contact the patient
    ↳ appointment_method true Requested type of appointment for the patient, should be 'video' or 'phone'
    ↳ start_time true Requested time for appointment as integer seconds since Epoch
    ↳ chief_complaint true Reason for the appointment
    ↳ provider_id false Id of the requested provider. Needed only when the patient would like to schedule a visit with a specific provider.
    ↳ chief_complaint_comments false Any additional description of the reason the patient is making the appointment
    ↳ concept_id false Id returned from auto-complete search of Clinical Concepts for the patient's chief complaint
    ↳ file_id false Id of the document to attach to the appointment.
    ↳ promocode false Promocode to apply to the cost of the appointment
    ↳ authorize_insurance false boolean to indicate that you would like to bill the appointment to insurance (true) or without insurance (false)
    ↳ customer_insurance_id false Insurance ID for the insurance a patient would like to bill
    ↳ agrees_to_informed_consent true Patient's answer to if they agree to the terms of MDLIVE Medical Group's Informed Consent
    ↳ agrees_to_privacy_agreement true Patient's answer to if they agree to the terms MDLIVE Medical Group's Privacy Policy
    ↳ consent_user_initials true Initials entered by patient to indicate they have answered the agreement questions
    ↳ pcp_questions false parent attribute for array of Primary Care Physician questions
        ↳ question false Name for PCP question
        ↳ answer false True or False answer to the Primary Care Physician question

    First Available Provider

    curl -X POST {server_url}/api/v2/patients/{patient_id}/appointments \
    -H "Content-type: application/json" \
    -H "Authorization: Bearer 34a2sample-api-token" \
    -d '{
          "appointment": {
            "provider_type_id": 3,
            "state_abbrev": "FL",
            "customer_call_in_number": "5555555555",
            "start_time": null,
            "survey_answer": "Emergency Room",
            "appointment_method": "phone",
            "chief_complaint": "Throat Pain",
            "concept_id": 64,
            "agrees_to_informed_consent": true,
            "agrees_to_privacy_agreement": true,
            "consent_user_initials": "TM",
            "pcp_questions": [
              {
                "question": "primary_care_physician",
                "answer": true
              },
              {
                "question": "pcp_correct_information",
                "answer": true
              },
              {
                "question": "pcp_visit_information",
                "answer": true
              },
              {
                 "question": "pcp_assistance_question",
                 "answer": false
              }
            ]
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/appointments",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token"
      },
      :payload => {
          "appointment"=> {
              "provider_type_id"=> 3,
              "state_abbrev"=> "GA",
              "customer_call_in_number"=> "5555555555",
              "start_time"=> null,
              "survey_answer"=> "Emergency Room",
              "appointment_method"=> "phone",
              "chief_complaint"=> "Throat Pain",
              "concept_id"=> 64,
              "agrees_to_informed_consent"=> true,
              "agrees_to_privacy_agreement"=> true,
              "consent_user_initials"=> "TM",
              "pcp_questions"=> [
                {
                  "question"=> "primary_care_physician",
                  "answer"=> true
                },
                {
                  "question"=> "pcp_correct_information",
                  "answer"=> true
                },
                {
                  "question"=> "pcp_visit_information",
                  "answer"=> true
                },
                {
                   "question"=> "pcp_assistance_question",
                   "answer"=> false
                }
              ]
            }
          }
    ).execute
    

    This should be called when the patient wants to meet with the first available Provider (no specific Provider). This call does not depend on Provider's availability.

    Future Appointment with a Specific Provider

    curl -X POST {server_url}/api/v2/patients/{patient_id}/appointments
    -H "Content-type: application/json" \
    -H "Authorization: Bearer 34a2sample-api-token"
    -d '{
          "appointment": {
            "provider_id": 4,
            "provider_type_id": 3,
            "state_abbrev": "FL",
            "customer_call_in_number": "5555555555",
            "start_time": 1516225743,
            "survey_answer": "Emergency Room",
            "appointment_method": "phone",
            "chief_complaint": "Throat Pain",
            "concept_id": 64,
            "agrees_to_informed_consent": true,
            "agrees_to_privacy_agreement": true,
            "consent_user_initials": "TM",
            "pcp_questions": [
              {
                "question": "primary_care_physician",
                "answer": true
              },
              {
                "question": "pcp_correct_information",
                "answer": true
              },
              {
                "question": "pcp_visit_information",
                "answer": true
              },
              {
                 "question": "pcp_assistance_question",
                 "answer": false
              }
            ]
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/appointments",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token"
      },
      :payload => {
          "appointment"=> {
              "provider_id"=> 4,
              "provider_type_id"=> 3,
              "state_abbrev"=> "GA",
              "customer_call_in_number"=> "5555555555",
              "start_time"=> 1516225743,
              "survey_answer"=> "Emergency Room",
              "appointment_method"=> "phone",
              "chief_complaint"=> "Throat Pain",
              "concept_id"=> 64,
              "agrees_to_informed_consent"=> true,
              "agrees_to_privacy_agreement"=> true,
              "consent_user_initials"=> "TM",
              "pcp_questions"=> [
                {
                  "question"=> "primary_care_physician",
                  "answer"=> true
                },
                {
                  "question"=> "pcp_correct_information",
                  "answer"=> true
                },
                {
                  "question"=> "pcp_visit_information",
                  "answer"=> true
                },
                {
                   "question"=> "pcp_assistance_question",
                   "answer"=> false
                }
              ]
            }
          }
    ).execute
    

    When the provider has timeslot in the available_hours object (See Provider Profile), the user has the option to schedule a future appointment with that Provider at that timeslot.

    Immediate Consultation (Deprecated)

    This model is no longer supported by MDLIVE.
    
    This model is no longer supported by MDLIVE.
    

    When the provider has is_visit_now_available set to true (See Search for Provider), the user has the option to schedule an immediate consultation with that Provider.

    Webhooks

    The message:provider:created action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "message:provider:created",
        "data": {
          "message": {
            "id": 105,
            "date_time": "2018-01-23T02:33:13+00:00",
            "from_id": 3,
            "to_id": 4,
            "unread_status": true,
            "replied_to_message_id": 104
          }
        }
      }
    }
    

    To get more details for the message, use messages - retrieve a conversation

    The consultation:provider:accepted action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "consultation:provider:accepted",
        "data": {
          "appointment": {
            "id": 43,
            "patient_id": 3,
            "provider_id": 4,
            "start_date": "Wednesday, Aug 07 2019 at 03:00PM EDT",
            "start_date_rfc3339": "2019-08-07T15:00:00-04:00",
            "appointment_by": "video",
            "status": "pending"
          }
        }
      }
    }
    

    To get more details for appointment, use appointments - list upcoming

    The consultation:provider:ready action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "consultation:provider:ready",
        "data": {
          "appointment": {
            "id": 43,
            "patient_id": 3,
            "provider_id": 4,
            "start_date": "Wednesday, Aug 07 2019 at 03:00PM EDT",
            "start_date_rfc3339": "2019-08-07T15:00:00-04:00",
            "appointment_by": "video",
            "status": "in_progress"
          }
        }
      }
    }
    

    To get more details for appointment, use appointments - list upcoming

    The prescription:pharmacy:accepted action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "prescription:pharmacy:accepted",
        "data": {
          "prescription": {
            "id": 1,
            "patient_id": 3,
            "provider_id": 4,
            "appointment_id": 43
          }
        }
      }
    }
    

    To get more details for appointment, use prescriptions

    The consultation:provider:requested action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "consultation:provider:requested",
        "data": {
          "availability": {
            "id": 43,
            "patient_id": 3,
            "provider_id": 4,
            "start_date": "2018-11-15T15:43:45+00:00"
          }
        }
      }
    }
    

    The consultation:status:changed action will send an event object structured like this:

    {
      "event": {
        "token": "random-uuid",
        "action": "consultation:status:changed",
        "data": {
          "appointment": {
            "id": 43,
            "patient_id": 3,
            "provider_id": 4,
            "start_date": "Wednesday, Aug 07 2019 at 03:00PM EDT",
            "start_date_rfc3339": "2019-08-07T15:00:00-04:00",
            "appointment_by": "video",
            "status": "completed"
          }
        }
      }
    }
    

    Webhooks allow you to receive notifications on events that occur within the MDLIVE system. When an event is triggered, we will send an HTTP POST request to your webhook url with an Event object.

    Events

    The event object sent to your configured webhook url will correspond to the type of object that triggers the event. For example, when a provider sends a message to a patient, the message:provider:created action gets triggered and a message data object will be supplied in the body of the webhook request.

    Actions

    Currently, we support the following actions:

    Action Description
    message:provider:created Any time a provider sends a patient a message.
    consultation:provider:accepted Any time the first available provider accepts the patients consultation from the waiting room.
    consultation:provider:ready When the provider is ready to connect with the patient for the video consultation.
    prescription:pharmacy:accepted Any time a pharmacy receives a prescription for a patient.
    consultation:provider:requested Any time a provider requests an appointment for a patient.
    consultation:status:changed Any time a patient consultation changes statuses.

    Patient Assessments

    MDLIVE offers behavioral assessments to aid providers in assessing the health of their patient and gauging their progress over time. A provider can request that a patient complete assessments on a recurring interval (for example, every two weeks). The patient is notified that the provider has requested that they complete the questionnaire by message.

    To see all the assessment types available in MDLIVE, see assessments list

    To see if a patient has been assigned any assessments by a provider, see assessment assignment list

    If a patient has assessments that have been assigned, use assessment show to retrieve the questionnaire data and present it to the patient. Once the patient has answered the questions, use assessment response create to save the responses.

    Assessments - List

    curl -X GET {server_url}/api/v1/assessments
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/assessments",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
        "assessments": [
            {
                "key": "CAGE-AID",
                "name": "Substance use Screening Test (CAGE-AID)"
            },
            {
                "key": "GAD-7",
                "name": "Anxiety Screening Test (GAD-7)"
            },
            {
                "key": "PHQ-9",
                "name": "Depression Screening Test (PHQ-9)"
            }
        ]
    }
    

    To retrieve the list of all assement types, make a request to:

    HTTP Request

    GET {server_url}/api/v1/assessments

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Assessment - Show

    curl -X GET {server_url}/api/v1/assessments/{assessment-key} \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/assessments/{assessment-key}',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like below

    {
        "assessment": {
            "key": "PHQ-9",
            "name": "Depression Screening Test (PHQ-9)",
            "description": "This depression screening test will quickly help you determine whether you may be suffering from depression. It takes less than a minute to complete and you'll be provided with an instant score.",
            "instructions": "Over the last two weeks, how often have you been bothered by any of the following problems?",
            "questions": [
                {
                    "id": "responses[0]",
                    "response_answer_key": "0",
                    "text": "Little interest or pleasure in doing things",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[1]",
                    "response_answer_key": "1",
                    "text": "Feeling down, depressed, or hopeless",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[2]",
                    "response_answer_key": "2",
                    "text": "Trouble falling or staying asleep, or sleeping too much",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[3]",
                    "response_answer_key": "3",
                    "text": "Feeling tired or having little energy",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[4]",
                    "response_answer_key": "4",
                    "text": "Poor appetite or overeating",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[5]",
                    "response_answer_key": "5",
                    "text": "Feeling bad about yourself—or that you are a failure or have let yourself or your family down",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[6]",
                    "response_answer_key": "6",
                    "text": "Trouble concentrating on things, such as reading the newspaper or watching television",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[7]",
                    "response_answer_key": "7",
                    "text": "Moving or speaking so slowly that other people could have noticed? Or the opposite—being so fidgety or restless that you have been moving around a lot more than usual",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                },
                {
                    "id": "responses[8]",
                    "response_answer_key": "8",
                    "text": "Thoughts that you would be better off dead or of hurting yourself in some way",
                    "options": [
                        {
                            "value": "0",
                            "text": "Not at all"
                        },
                        {
                            "value": "1",
                            "text": "Several days"
                        },
                        {
                            "value": "2",
                            "text": "More than half the days"
                        },
                        {
                            "value": "3",
                            "text": "Nearly everyday"
                        }
                    ]
                }
            ]
        }
    }
    

    HTTP Request

    To retrieve a specific document, make a request to:

    GET {server_url}/api/v1/assessments/{assessment-key}

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    assessment-key true Key of assessment type retrieved from assessments list

    Assessment Assignment - List

    curl -X GET {server_url}/api/v1/patients/{patient_id}/assessment_assignments
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/assessment_assignments",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
        "assessment_assignments": [
            {
                "patient_id": 4,
                "provider_id": 40,
                "assessment_key": "PHQ-9"
            },
            {
                "patient_id": 4,
                "provider_id": 40,
                "assessment_key": "CAGE-AID"
            }
        ]
    }
    

    To retrieve the list of a patient's current list of assigned assessments, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/assessment_assignments

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required to retrieve the list of patient's medical conditions.

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Assessment Response - Create

    curl -X POST {server_url}/api/v1/patients/{patient_id}/assessment_responses
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{"assessment" : {
            "assessment_key": "PHQ-9",
            "responses": {
                "0": "0", 
                "1": "0", 
                "2": "0", 
                "3": "1", 
                "4": "1", 
                "5": "1", 
                "6": "2", 
                "7": "2", 
                "8": "0"
            }
        }
    }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/assessment_responses",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {"assessment"=> {
        "assessment_key"=> "PHQ-9",
        "responses"=> {
            "0"=> "0", 
            "1"=> "0", 
            "2"=> "0", 
            "3"=> "1", 
            "4"=> "1", 
            "5"=> "1", 
            "6"=> "2", 
            "7"=> "2", 
            "8"=> "0"
        }
    }}).execute
    

    The above command returns JSON structured like this:

    {
        "assessment_response": {
            "id": 4,
            "patient_id": 4,
            "provider_id": 40,
            "numeric_score": 7,
            "text_score": "mild_depression_possible",
            "assessment_key": "PHQ-9",
            "responses": {
                "0": "0",
                "1": "0",
                "2": "0",
                "3": "1",
                "4": "1",
                "5": "1",
                "6": "2",
                "7": "2",
                "8": "0"
            },
            "created_at": "2020-03-03T14:53:57.000-05:00",
            "updated_at": "2020-03-03T14:53:57.000-05:00",
            "results": {
                "summary": "Mild Depression Possible",
                "description": "Your screening results appear to indicate that you may be suffering from mild depression. Depression symptoms take many forms and each person’s experience can vary. Many people experience reduced energy and decreased activity. People who have answered in a similar way to you may note that their symptoms last longer than a day or two. While some people may be able to cope effectively with this level of depression in their daily life, others may need a helping hand.",
                "disclaimer": "The results of this quiz do not constitute a diagnosis or a recommendation for treatment.  You may still choose to consult with a mental health professional to discuss any concerns or questions.  For crisis situations, please call the National Suicide Prevention Lifeline at 1-800-273-8255. The call is free and help is available 24 hours per day, 7 days per week.  If you are experiencing an emergency, call 911 or go to your nearest emergency room."
            }
        }
    }
    

    To create an assessment response for a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v1/patients/{patient_id}/assessment_responses

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when creating an assessment response.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    assessment true Parent attribute for assessment
    ↳ assessment_key true Type of assessment. Must be of a type returned by assessments list
    ↳ responses true Hash of response answer objects
    ↳↳  key true response_answer_key value found in assessment show questions attribute
    ↳↳  value true the selected option value found in assessment show questions:options attribute

    Entities

    After Care Instructions - Show

    curl -X GET {server_url}/api/v2/patients/{patient_id}/cust_appointments/{cust_appt_id}/after_care_instructions \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/patients/{patient_id}/cust_appointments/{cust_appt_id}/after_care_instructions',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like below.

    {
        "after_care_instructions": [
            {
                "title": "Abdominal Pain - Stress Related",
                "definition": "<ul><li>Pain or discomfort in the stomach (abdomen or belly)</li><li>The stomach pains occur when your child is worried about something.</li><li>This is often called the &quot;worried stomach&quot;.</li></ul>",
                "care_advice": [
                    "<strong>Overview:</strong><ul><li>Over 10% of children have a &quot;worried stomach&quot;.</li><li>Your child can learn to control it.</li><li>Here is some care advice that should help.</li></ul>",
                    "<div><strong>Relax:</strong></div>\r\n\r\n<ul>\r\n <li>Help your child get very relaxed. This should help relieve the pain.</li>\r\n <li>Have your child lie down in a quiet place and take slow deep breaths. Make the belly go up and down with each breath.</li>\r\n <li>Then try to relax all the muscles in the body. Think about something pleasant. </li>\r\n <li>Some kids also find it helpful to listen to CDs that teach them how to relax.</li>\r\n</ul>",
                    "<strong>Talking:</strong><ul><li>Help your child talk about events that trigger the stomach pain.</li><li>Talk to your child about how to cope with these the next time around.</li><li>Help your child worry less about things he or she can't control.</li></ul>",
                    "<div><strong>Sleep:</strong></div>\r\n\r\n<ul>\r\n <li>Make sure your child gets enough sleep. This should be at least 8 hours each night.</li>\r\n <li>Stress is easier to handle if you get eenough sleep</li>\r\n</ul>",
                    "<div><strong>What to Expect:</strong></div>\r\n\r\n<ul>\r\n <li>If your child can relax, the pain may be gone in 30 minutes. If not, the pain may last 2-3 hours.</li>\r\n <li>These &nbsp;&quot;worried stomach&quot; stomach attacks may continue to come and go. Many adults have it.</li>\r\n <li>The only way to reduce attacks is to learn to deal with normal stresses.</li>\r\n</ul>",
                    "<strong>Return to School:</strong><ul><li>Make sure that your child doesn't miss any school because of stomach pains.</li><li>Stressed children tend to want to stay home when the going gets rough.</li></ul>"
                ],
                "health_info": "<p><strong>Symptoms</strong></p><ul><li>The pain occurs in the pit of the stomach or near the belly button.</li><li>The pain is mild to moderate.</li><li>The pain is real but harmless.</li></ul><p><strong>Pain Scale</strong></p><ul><li><strong>Mild:</strong> Your child feels pain and tells you about it. But, the pain does not keep your child from any normal activities. School, play and sleep are not changed.</li><li><strong>Moderate:</strong> The pain keeps your child from doing some normal activities. It may wake him or her up from sleep.</li><li><strong>Severe:</strong> The pain is very bad. It keeps your child from doing all normal activities.</li></ul><p><strong>Causes</strong></p><ul><li>The most common cause of frequent stomach pains is stress and worries.</li><li>These children tend to be sensitive and very serious. They often are model children.</li><li>This can make them more at risk to the normal stresses of life.</li></ul><p><strong>Prevention of Stress</strong></p><ul><li>Teach your child the importance of getting enough sleep</li><li>Daily exercise helps. Exercise releases chemicals that protect the body from stress.</li><li>Do something fun and relaxing every day. Examples are music, a walk, reading, and talking with friends.</li></ul>",
                "call_back": "<ul><li>Stomach ache becomes worse than usual</li><li>Stomach ache lasts longer than usual</li><li>You think your child needs to be seen</li><li>Your child becomes worse</li></ul>",
                "related_topics": [
                    "Abdominal Pain - General"
                ],
                "internet_resources": []
            }
        ]
    }
    

    In some cases, the Provider might send After Care Instructions to the patient after a consultation.

    When After Care Instructions are available for specific consultation, one will see "after_care_instruction": true under the completed_appointments section when calling the following endpoint Retrieve a Patient.

    To retrieve after care instructions for a specific consultation, make a request to:

    HTTP Request

    GET {server_url}/api/v2/patients/{patient_id}/cust_appointments/{cust_appt_id}/after_care_instructions

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    cust_appt_id true Appointment ID of the after care instructions being requested

    Allergies - Create

    curl -X POST {server_url}/api/v2/patients/{patient_id}/allergies
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{
          "allergy": {
            "name": "Peanut",
            "severity": "Severe",
            "reaction": "Throat closes",
            "fdb_allergy_id": "568"
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/allergies",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {
                     "allergy"=> {
                       "name"=> "Peanut",
                       "severity"=> "Severe",
                       "reaction"=> "Throat closes",
                       "fdb_allergy_id"=> "568"
                     }
                   }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "allergy": {
        "id": 110751,
        "name": "Peanut",
        "severity": "Severe",
        "active": true,
        "reaction": "Throat closes",
        "source": "Self Reported",
        "current": null,
        "fdb_allergy_id": "568"
      }
    }
    

    To create an allergy for a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v2/patients/{patient_id}/allergies

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when creating an allergy. To search for the allergy and retrieve needed parameter values, reference allergies - search.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    allergy true Parent attribute for allergy
    ↳ name true Description of allergy retrieved from search
    ↳ severity true Description of severity. Should be one of:
    • Not Sure
    • Mild
    • Moderate
    • Severe
    ↳ reaction true Description of reaction to allergen
    Value can be a maximum of 80 characters
    ↳ fdb_allergy_id false FDB Allergy Id

    Implementation

    Allergy Implementation

    Allergies - Delete

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove an allergy from a patient's list of allergies, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/allergies/{allergy_id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when removing an allergy.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    allergy_id true ID of patient's allergy

    Allergies - Delete Using FDB

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy{fdb_allergy_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy/{fdb_allergy_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove an allergy from a patient's list of allergies using the FDB Allergy Id, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/allergies/fdb_allergy/{fdb_allergy_id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when removing an allergy.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    fdb_allergy_id true FDB Id of patient's allergy

    Allergies - List

    curl -X GET {server_url}/api/v1/patients/{patient_id}/allergies
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/allergies",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
    
      "allergies": [
        {
          "id": 110750,
          "name": "Peanut",
          "severity": "Severe",
          "active": true,
          "reaction": "Throat closes",
          "source": "Self Reported",
          "current": true,
          "fdb_allergy_id": "568"
        },
        {
          "id": 110749,
          "name": "Ibuprofen",
          "severity": "Moderate",
          "active": true,
          "reaction": "Rashes on skin",
          "source": "Self Reported",
          "current": true,
          "fdb_allergy_id": "54222803"
          }
       ]
    }
    

    To retrieve the list of a patient's current list of allergies, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/allergies

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required to retrieve the list of patient's medical conditions.

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    curl -X POST {server_url}/api/v1/allergies/search
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{ "search": {
            "term": "pen",
            "limit": "2"
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/allergies/search",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => { "search"=> {
                      "term"=> "pen",
                      "limit"=> "2"
                    }
                  }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "allergies": [
        {
          "id": 977,
          "name": "Penicillins"
        },
        {
          "id": 981,
          "name": "Pentamidine"
        }
      ]
    }
    

    MDLIVE offers the ability to search against allergies to be used for offering auto-complete suggestions as a patient is adding an allergy. To search, make a request to:

    HTTP Request

    POST {server_url}/api/v1/allergies/search

    This request must include a valid JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are accepted when searching medical conditions.

    Request Body Parameter

    Attribute Required Description
    search true Parent attribute for search criteria
    ↳ term true The term to match (string)
    ↳ limit false Limit size of the result set, default size is 10

    Alternate Visit Options - List

    The options to be chosen by the patient in case MDLIVE was not available for the appointment.

    curl -X GET {server_url}/api/v2/support/alternate_visit_options \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/support/alternate_visit_options',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "alternate_visit_question": "Where would you have gone?",
      "alternate_visit_options": [
        "Emergency Room",
        "Urgent Care",
        "Primary Care Physician",
        "Delay Seeking Care",
        "Other"
      ]
    }
    

    HTTP Request

    To retrieve the alternate visit survey question and list of alternate visit options, make a request to:

    GET {server_url}/api/v2/support/alternate_visit_options

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Content-type application/json
    Accept application/json

    This request must include a valid JWT token, please see our documentation.

    Appointments - Cancel

    curl -X PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :put,
      :url => '{server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type'  => 'application/json',
        'Accept'  => 'application/json',
      }
    ).execute
    

    The above command returns a 204 NO CONTENT response.

    The following endpoint can be used to cancel a scheduled appointment. Please note that the appointment can not be canceled once it has started.

    HTTP Request

    To cancel a patient's appointment, make a request to:

    PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Content-type application/json
    Accept application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    appointment_id true ID of patient's appointment

    Appointments - List Upcoming

    The list of appointments returned as upcoming include all future appointments as well as any appointment within the last 60 minutes.

    curl -X GET {server_url}/api/v2/patients/{patient_id}/appointments/upcoming \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/patients/{patient_id}/appointments/upcoming',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "appointments":[
        {
          "id":1,
          "provider":{
            "id":36,
            "full_name": "Test Provider",
            "provider_type": "General Medical",
            "photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png"
          },
          "start_date":"2018-01-17T19:18:14+00:00",
          "appointment_by":"video",
          "in_progress":false,
          "customer_call_in_number":"7866665555",
          "chief_complaint":"sore throat",
          "wait_info":{
            "average_wait_time": null, Deprecated
            "patients_in_queue": null, Deprecated
            "message": "We will send updates to your phone",
            "over_time_message": "under 30",
            "wait_time_label": "Estimated Provider call back time",
            "position_in_line_label": null,  Deprecated
            "web_instructions_message": "Please keep this window open and a Provider will be with you shortly",
            "mobile_instructions_message": "Provider will be calling you on the phone number provided"
          }
          "on_waiting_room":false,
          "provider_ready":false
        }
      ]
    }
    

    HTTP Request

    To retrieve the list of a patient's upcoming appointments, make a request to:

    GET {server_url}/api/v2/patients/{patient_id}/appointments/upcoming

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Response Values

    The provider_ready attribute can be polled to monitor the status of an upcoming video appointment. When it is set to true, it is safe to connect to the patient to the video consulation. As an alternative to polling this attribute, you can register for the consultation:provider:ready webhook. To connect to the patient to the video consultation, the video consultations in browser provides the information needed.

    If the patient is waiting for the first available provider, the wait_info attribute will be populated. Wait times are in minutes. We recommend using the combination of wait_time_label with over_time_message.

    Appointments - Patient Arrival

    curl -v -X PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room \
      -H 'Authorization: Bearer {jwt_token}' \
      -d ''
    
    RestClient::Request.new(
      :method => :put,
      :url => '{server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}'
      }
    ).execute
    

    The above command returns 200 OK with no content.

    This call is used to notify a provider that a patient has arrived to an appointment.

    HTTP Request

    To notify the provider that a patient has arrived to the appointment, make a request to:

    POST {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    appointment_id true MDLIVE ID for appointment

    Appointments - Video Consultations in Browser

    curl -X GET {server_url}/api/v1/appointments/{appointment_id}/connection_params \
      -H 'Authorization: Bearer: {jwt_token}' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/appointments/{appointment_id}/connection_params',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "patient_id":4,
      "provider_id":36,
      "start_time":"2018-01-27T16:00:00.000Z",
      "end_time":"2018-01-27T16:30:00.000Z",
      "url":"https://patients.mdlive.com/appointments/1?signature=?signature=2a28d944aa28e63ec0d0d636cc22d801a660a12092399e43a208378902c78d91"}
    

    This call is used to fetch information about a video consultation, including the url to the page that allows patients to join. Going to the url specified in the response automatically registers the patient_arrival.

    HTTP Request

    To fetch information about a video consultation, including the url to the page that allows patients to join, make a request to:

    GET {server_url}/api/v1/appointments/{appointment_id}/connection_params

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    appointment_id true MDLIVE ID for appointment

    Query String Parameter

    The following parameter can be included to pass through a redirect url to use when the appointment has concluded.

    GET {server_url}/api/v1/appointments/{appointment_id}/connection_params?post_consultation_url=https%3A%2F%2Fpostconsultationurl.com
    
    Attribute Required Description
    post_consultation_url false The encoded URL for redirect after consultation ends.
    If launching video appointment from a third party mobile application on iOS into a native Safari browser (iOS 12+ only), post_consultation_url (if passed) will be used to redirect back to the original mobile application when the appointment has concluded.

    Appointment Requests - Create

    Request an appointment with a Provider who does not have any availabilities during a specific date/time.

    curl -X POST {server_url}/api/v2/patients/{patient_id}/appointment_requests \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
      -d '{
            "appointment_request": {
              "provider_id": "1",
              "chief_complaint": "Sore Throat",
              "chief_complaint_comments": "Have been feeling symptoms for over 1 week now",
              "contact_number": "888-632-2738",
              "appointment_date": "2018-12-20",
              "appointment_method": "phone",
              "preferred_time": "morning",
              "state_abbrev": "FL"
            }
          }'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/patients//{patient_id}/appointment_requests',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
      :payload => {
                     "appointment_request"=> {
                       "provider_id"=> "1",
                       "chief_complaint"=> "Sore Throat",
                       "chief_complaint_comments"=> "Have been feeling symptoms for over 1 week now",
                       "contact_number"=> "888-632-2738",
                       "appointment_date"=> "2018-12-20",
                       "appointment_method"=> "phone",
                       "preferred_time"=> "morning",
                       "state_abbrev": "FL"
                     }
                   }
    ).execute
    

    The above command returns 200 OK with the following response:

    {
        "appointment_request": {
            "id": 13,
            "patient_id": 3,
            "provider_id": 1,
            "chief_complaint": "Sore Throat",
            "contact_number": "888-632-2738",
            "appointment_date": "18-12-20",
            "appointment_method": "phone",
            "preferred_time": "morning",
            "state_abbrev": "FL"
        }
    }
    

    HTTP Request

    To request an appointment with a provider, make a request to:

    POST {server_url}/api/v2/patients/{patient_id}/appointment_requests

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    appointment_request true Parent attribute for appointment_request
    ↳ provider_id true ID of the requested provider. Needed only when the patient would like to schedule a visit with a specific provider.
    ↳ chief_complaint true Reason for the appointment
    ↳ chief_complaint_comments false Any additional description of the reason the patient is making the appointment
    ↳ contact_number true Preferred phone number to contact the patient
    ↳ appointment_date true Requested date for appointment
    ↳ appointment_method true Requested type of appointment for the patient, should be 'video' or 'phone'
    ↳ preferred_time true Preferred time of appointment. Should be one of:
    • First Available
    • Morning
    • Afternoon
    • Evening
    ↳ state_abbrev false Requested U.S. state for the appointment request

    Appointment Requests - Cancel

    Cancel a pending appointment request with a Provider.

    curl -X POST {server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/cancel \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/cancel',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns 200 OK with the following JSON structured response:

    {
        "message": "Your appointment request has been cancelled"
    }
    

    HTTP Request

    To cancel a pending appointment request with a provider, make a request to:

    POST {server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/cancel

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    appointment_request_id true Appointment Request ID that is being canceled

    Appointment Requests - Remind

    Remind a Provider with regards to a pending appointment request.

    curl -X POST {server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/remind \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/remind',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns 200 OK with the following JSON structured response:

    {
        "message": "The Provider was reminded about your appointment request"
    }
    

    HTTP Request

    To remind a provider about a pending appointment request, make a request to:

    POST {server_url}/api/v2/patients/{patient_id}/appointment_requests/{appointment_request_id}/remind

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    appointment_request_id true Appointment Request ID that is being reminded

    Behavioral Health History - Create

    curl -X POST {server_url}/api/v1/patients/:patient_id/behavioral_histories
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{
          "behavioral_history": {
            "behavioral_health_reasons": [
              {
                "condition": "Emotional Problem",
                "active": false
              },
              {
                "condition": "Substance Abuse",
                 "active": true
               },
               {
                 "condition": "Relationship Issue",
                 "active": false
               },
               {
                 "condition": "Other",
                 "active": true
               }
            ],
            "behavioral_health_description": "drinking to deal with stress",
            "behavioral_mconditions": [
              { "condition": "Alcohol Dependence", "active": false },
              { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false },
              { "condition": "Anxiety", "active": false },
              { "condition": "Panic Attacks", "active": false },
              { "condition": "Bipolar Disorder", "active": false },
              { "condition": "Schizophrenia", "active": false },
              { "condition": "Depression", "active": false },
              { "condition": "Substance Abuse", "active": true }
            ],
            "behavioral_family_history": [
              { "condition": "Alcohol Dependence", "active": false },
              { "condition": "Obsessive Compulsive Disorder (OCD)", "active": false },
              { "condition": "Bipolar Disorder", "active": false },
              { "condition": "Schizophrenia", "active": false },
              { "condition": "Depression", "active": false },
              { "condition": "Substance Abuse", "active": true }
            ],
            "counseling_preference": "No Preference",
            "hospitalized": false
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/:patient_id/behavioral_histories",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {
                        "behavioral_history"=> {
                          "behavioral_health_reasons"=> [
                            {
                              "condition"=> "Emotional Problem",
                              "active"=> false
                            },
                            {
                              "condition"=> "Substance Abuse",
                              "active"=> true
                            },
                            {
                              "condition"=> "Relationship Issue",
                              "active"=> false
                            },
                            {
                              "condition"=> "Other",
                              "active"=> true
                            }
                          ],
                          "behavioral_health_description"=> "drinking to deal with stress"
                          "behavioral_mconditions"=> [
                            { 
                              "condition"=> "Alcohol Dependence", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Obsessive Compulsive Disorder (OCD)", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Anxiety", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Panic Attacks", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Bipolar Disorder", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Schizophrenia",
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Depression", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Substance Abuse", 
                              "active"=> true 
                            }
                          ],
                          "behavioral_family_history"=> [
                            { 
                              "condition"=> "Alcohol Dependence", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Obsessive Compulsive Disorder (OCD)", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Bipolar Disorder", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Schizophrenia", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Depression", 
                              "active"=> false 
                            },
                            { 
                              "condition"=> "Substance Abuse", 
                              "active"=> true 
                            }
                          ],
                          "counseling_preference"=> "No Preference",
                          "hospitalized"=> false
                        },
                      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "behavioral_history": {
        "behavioral_health_reasons": [
          {
            "condition": "Emotional Problem",
            "active": false
          },
          {
            "condition": "Substance Abuse",
            "active": true
          },
          {
            "condition": "Relationship Issue",
            "active": false
          },
          {
            "condition": "Other",
            "active": false
          }
        ],
        "behavioral_mconditions": [
          {
            "condition": "Alcohol Dependence",
            "active": true
          },
          { 
            "condition": "Obsessive Compulsive Disorder (OCD)",
            "active": false
          },
          { 
            "condition": "Anxiety",
            "active": false
          },
          {
            "condition": "Panic Attacks",
            "active": false
          },
          {
            "condition": "Bipolar Disorder",
            "active": false
          },
          {
            "condition": "Schizophrenia",
            "active": false
          },
          {
            "condition": "Depression",
            "active": false
          },
          {
            "condition":"Substance Abuse",
            "active": false
          } 
        ],
        "behavioral_family_history": [
          {
            "condition": "Alcohol Dependence",
            "active": true
          },
          {
            "condition": "Obsessive Compulsive Disorder (OCD)",
            "active": false
          },
          {
            "condition": "Bipolar Disorder",
            "active": false
          },
          {
            "condition": "Schizophrenia",
            "active": false
          },
          {
            "condition": "Depression",
            "active": false
          },
          {
            "condition": "Substance Abuse",
            "active": false
          }
        ],
        "behavioral_health_description": "drinking to deal with stress",
        "hospitalized": false,
        "family_hospitalized": false,
        "hospitalized_date": null,
        "hospitalized_duration": null,
        "counseling_preference": "No Preference"
      }
    }
    

    To create or update the behavioral health history for a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v1/patients/:patient_id/behavioral_histories

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are permitted when creating or updating the behavorial health history of a patient. The payload can contain the entire patient behavioral health history with appropriate attribute values set, or it can contain the required items plus only the non-required items that have been modified.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    behavioral_history true Parent attribute for behavioral health history
    ↳ behavioral_health_reasons true Parent attribute for the array of reasons a patient would seek behavioral care. (Include an item in the array for each reason with active set to true/false)
          ↳ condition true Name of condition. Should be one of:
    • Emotional Problem
    • Substance Abuse
    • Relationship Issue
    • Other
          ↳ active true Patient's answer for that condition. Should be either:
    • true
    • false
    ↳ behavioral_health_description false Additional explanation for the reason for seeking behavioral care (required if behavioral health reasons contains condition 'Other'
    ↳ behavioral_mconditions true Parent attribute for the array of behavioral medical conditions (Include an item in the array for each condition with active set to true/false)
          ↳ condition true Name of condition. Should be one of:
    • Alcohol Dependence
    • Obsessive Compulsive Disorder (OCD)
    • "Bipolar Disorder
    • Schizophrenia
    • Depression
    • Substance Abuse
          ↳ active true Patient's answer for that condition. Should be either:
    • true
    • false
    ↳ behavioral_family_history true Parent attribute for the array of family behavioral health history (Include an item in the array for each condition with active set to true/false)
          ↳ condition true Name of condition. Should be one of:
    • Alcohol Dependence
    • Obsessive Compulsive Disorder (OCD)
    • Bipolar Disorder
    • Schizophrenia
    • Depression
    • Substance Abuse
          ↳ active true Patient's answer for that condition. Should be either:
    • true
    • false
    ↳ hospitalized true Has the patient ever been hospitalized for mental health or substance abuse treatment. Should be either:
    • true
    • false
    ↳ hospitalized_date false Date of patient hospitalization if true, in the format YYYY-MM-DD (required when 'hospitalized' is true)
    ↳ hospitalized_duration false Description of length of stay in the hospital provided by the patient (required when 'hospitalized' is true)
    ↳ family_hospitalized false Has a family member of the patient ever been hospitalized for mental health or substance abuse treatment. Should be either:
    • true
    • false
    ↳ counseling_preference true Patient's prefence in provider. Should be one of:
    • No Preference
    • Male
    • Female

    Behavioral Health History - List

    curl {server_url}/api/v1/patients/:patient_id/behavioral_histories
    -H "Content-type: application/json"
    -H "Authorization: Bearer 34a2sample-user-token"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/:patient_id/behavioral_histories",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "behavioral_history": {
        "behavioral_health_reasons": [
          {
            "condition": "Emotional Problem",
            "active": true
          },
          {
            "condition": "Substance Abuse",
            "active": false
          },
          {
            "condition": "Relationship Issue",
            "active": false
          },
          {
            "condition": "Other",
            "active": false
          }
        ],
        "behavioral_mconditions": [
          {
            "condition": "Alcohol Dependence",
            "active": false
          },
          { 
            "condition": "Obsessive Compulsive Disorder (OCD)",
            "active": false
          },
          { 
            "condition": "Anxiety",
            "active": false
          },
          {
            "condition": "Panic Attacks",
            "active": true
          },
          {
            "condition": "Bipolar Disorder",
            "active": false
          },
          {
            "condition": "Schizophrenia",
            "active": false
          },
          {
            "condition": "Depression",
            "active": true
          },
          {
            "condition":"Substance Abuse",
            "active": false
          } 
        ],
        "behavioral_family_history": [
          {
            "condition": "Alcohol Dependence",
            "active": false
          },
          {
            "condition": "Obsessive Compulsive Disorder (OCD)",
            "active": false
          },
          {
            "condition": "Bipolar Disorder",
            "active": false
          },
          {
            "condition": "Schizophrenia",
            "active": false
          },
          {
            "condition": "Depression",
            "active": true
          },
          {
            "condition": "Substance Abuse",
            "active": false
          }
        ],
        "behavioral_health_description": "dealing with a lot of stress.",
        "hospitalized": true,
        "family_hospitalized": false,
        "hospitalized_date": "2016-04-15",
        "hospitalized_duration": "2 days",
        "counseling_preference":"No preference"
      }
    }
    

    Retrieve the behavioral health history of the patient. You need only supply the unique patient identifier that was returned upon patient registration.

    HTTP Request

    GET {server_url}/api/v1/patients/:patient_id/behavioral_histories

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Request Body

    The following parameters are required to retrieve a patient.

    Attribute Required Description
    patient_id true ID of the patient to be retrieved
    curl -X GET {server_url}/api/v1/patients/chief_complaints
    -H "Content-type: application/json" \
    -H "Authorization: Bearer {jwt_token}" \
    -H 'Accept: application/json' \
    -d '{ "search": {
            "term": "throat",
            "language": "EN",
            "limit": "3"
          }
        }'
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/chief_complaints",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}",
        "Accept" => "application/json"
      },
      :payload => { "search"=> {
                        "term"=> "throat",
                        "language"=> "EN",
                        "limit"=> "3"
                     }
                  }
    ).execute
    

    The above command returns JSON structured like this:

    {
        "chief_complaints": [
            {
                "id": 896,
                "concept_id": 64,
                "ccc": true,
                "dx": true,
                "alternate_term": "Painful Throat",
                "title": "Throat pain (sore throat)",
                "title_plain_language": "Throat pain (sore throat)",
                "title_spanish": null,
                "icd9": "784.1",
                "icd10": "R07.0",
                "snomed": "267102003",
                "language_id": 1,
                "request_image": 2,
                "image_required": true,
                "alternate_term_english_version": "Painful Throat",
                "frequency": 103112,
                "created_at": "2021-07-23T01:26:08.582-04:00",
                "updated_at": "2021-07-23T01:26:08.582-04:00",
                "active": true,
                "suggestable_alternate_term": "Painful Throat",
                "is_blocked": false,
                "escalation_level": null,
                "rejectable_chief_complaint_id": null
            },
            {
                "id": 901,
                "concept_id": 64,
                "ccc": true,
                "dx": true,
                "alternate_term": "Sore Throat",
                "title": "Throat pain (sore throat)",
                "title_plain_language": "Throat pain (sore throat)",
                "title_spanish": null,
                "icd9": "784.1",
                "icd10": "R07.0",
                "snomed": "267102003",
                "language_id": 1,
                "request_image": 2,
                "image_required": true,
                "alternate_term_english_version": "Sore Throat",
                "frequency": 103112,
                "created_at": "2021-07-23T01:26:08.582-04:00",
                "updated_at": "2021-07-23T01:26:08.582-04:00",
                "active": true,
                "suggestable_alternate_term": "Sore Throat",
                "is_blocked": false,
                "escalation_level": null,
                "rejectable_chief_complaint_id": null
            },
            {
                "id": 906,
                "concept_id": 64,
                "ccc": true,
                "dx": true,
                "alternate_term": "Throat Hurts",
                "title": "Throat pain (sore throat)",
                "title_plain_language": "Throat pain (sore throat)",
                "title_spanish": null,
                "icd9": "784.1",
                "icd10": "R07.0",
                "snomed": "267102003",
                "language_id": 1,
                "request_image": 2,
                "image_required": true,
                "alternate_term_english_version": "Throat Hurts",
                "frequency": 103112,
                "created_at": "2021-07-23T01:26:08.582-04:00",
                "updated_at": "2021-07-23T01:26:08.582-04:00",
                "active": true,
                "suggestable_alternate_term": "Throat Hurts",
                "is_blocked": false,
                "escalation_level": null,
                "rejectable_chief_complaint_id": null
            }
        ]
    }
    

    MDLIVE offers the ability to search against a list of chief complaints to be used for offering auto-complete suggestions as a patient is scheduling a visit.

    HTTP Request

    GET {server_url}/api/v1/patients/chief_complaints

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are accepted when searching chief complaints.

    Request Body

    Attribute Required Description
    search true parent attribute for search criteria
    ↳ term true The term to match (string)
    ↳ language false Options are 'EN' (English) and 'ES' (Spanish), default language is English
    ↳ limit false Limit size of the result set, default size is 10

    Consultation Summary - Show

    curl -X GET {server_url}/api/v1/patients/{patient_id}/appointments/consultation_summary?cust_appt_id={cust_appt_id} \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/patients/{patient_id}/appointments/consultation_summary?cust_appt_id={cust_appt_id}',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like below where data is the Base64 encoded value of the PDF Document.

    {
      "consultation_summary": {
        "data":"JVBERi0xLjQKMSAwIG9iago8PAovVGl0bGUgKP7/KQovQ3JlYXRvciAo/v8A\ndwBrAGgAdABtAGwAdABvAHAAZABmACAAMAAuADEAMgAuADMpCi9Qcm9kdWNl\nciAo/v8AUQB0ACAANAAuADgALgA3KQovQ3JlYXRpb25EYXRlIChEOjIwMTgw\nNzI2MTU0MDI4LTA0JzAwJykKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUg\nL0V4dEdTdGF0ZQovU0EgdHJ1ZQovU00gMC4wMgovY2EgMS4wCi9DQSAxLjAK\nL0FJUyBmYWxzZQovU01hc2sgL05vbmU+PgplbmRvYmoKNCAwIG9iagpbL1Bh\ndHRlcm4gL0RldmljZVJHQl0KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0Fu\nbm90Ci9TdWJ0eXBlIC9MaW5rCi9SZWN0IFs1OS43NTk5OTk5ICAzMTYuNTYw\nMDAwICAxMjUuMDM5OTk5ICAzMjkuMDQwMDAwIF0KL0JvcmRlciBbMCAwIDBd\nCi9BIDw8Ci9UeXBlIC9BY3Rpb24KL1MgL1VSSQovVVJJICh0ZWw6KQo+Pgo+\nPgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0Fubm90Ci9TdWJ0eXBlIC9M\naW5rCi9SZWN0IFs1OS43NTk5OTk5ICAxNzguMzIwMDAwICAxMzQuNjM5OTk5\nICAxOTAuODAwMDAwIF0KL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MDAwMDE4NTgwIDAwMDAw\nIG4gCjAwMDAwMTkwMzkgMDAwMDAgbiAKMDAwMDAxODU1OSAwMDAwMCBuIAp0\ncmFpbGVyCjw8Ci9TaXplIDMxCi9JbmZvIDEgMCBSCi9Sb290IDExIDAgUgo+\nPgpzdGFydHhyZWYKMjAxMTQKJSVFT0YK\n"
      }
    }
    

    HTTP Request

    To retrieve a specific document, make a request to:

    GET {server_url}/api/v1/patients/{patient_id}/appointments/consultation_summary?cust_appt_id={cust_appt_id}

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    cust_appt_id true Appointment ID of the consultation summary pdf being requested

    Customer Documents - Create

    curl -v -X POST {server_url}/api/v2/patients/{patient_id}/documents \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
        "doc": {
          "document_name": "INSERT_DOCUMENT_NAME_WITH_EXTENSION_HERE",
          "data": "INSERT_BASE64_ENCODED_DATA_HERE",
          "mime_type": "INSERT_MIME_TYPE_HERE",
          "record_type": "Patient Record"
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => '{server_url}/api/v2/patients/{patient_id}/documents',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type'  => 'application/json',
        'Accept'  => 'application/json',
      },
      :payload => {
        :doc => {
          :document_name => 'INSERT_DOCUMENT_NAME_WITH_EXTENSION_HERE',
          :data          => 'INSERT_BASE64_ENCODED_DATA_HERE',
          :mime_type     => 'INSERT_MIME_TYPE_HERE',
          :record_type   => 'Patient Record'
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "doc":{
        "id":1,
        "mime_type":"image/png",
        "record_type":"Patient Record",
        "upload_date":"2018-01-16T20:51:06+00:00",
        "document_name":"DOGE.png",
        "upload_by":"test patient",
        "extension":"png"
      }
    }
    

    An example of a customer document is a photo of a symptom that a patient takes before an appointment. Please store the id that gets returned. You'll be able to use it when you create the appointment.

    HTTP Request

    To create a customer document, make a request to:

    POST {server_url}/api/v2/patients/{patient_id}/documents

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    The following parameters need to be included in the body of the request:

    Attribute Required Description
    doc true Parent attribute for customer documents
    ↳ document_name true Desired filename
    ↳ data true Base64 encoded file data
    ↳ mime_type true Mime type, e.g. image/png
    ↳ record_type true One of the following values:
    • Behavioral
    • Exam-Face2Face
    • Patient Record
    • Test Result
    • Wellness Panel Results

    Customer Documents - Delete

    curl -v -X DELETE {server_url}/api/v1/patients/{patient_id}/documents/{document_id} \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json'
    
    RestClient::Request.new(
      :method => :delete,
      :url => '{server_url}/api/v1/patients/{patient_id}/documents/{document_id}',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json'
      }
    ).execute
    

    HTTP Request

    To remove a customer document, make a request to:

    DELETE {server_url}/api/v1/patients/{patient_id}/documents/{document_id}

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    document_id true MDLIVE ID for patient

    Customer Documents - List

    curl -X GET {server_url}/api/v1/patients/{patient_id}/documents \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/patients/{patient_id}/documents',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "documents":[
        {
          "id":1,
          "mime_type":"image/png",
          "record_type":"Patient Record",
          "upload_date":"2018-01-16T20:51:06+00:00",
          "document_name":"DOGE.png",
          "upload_by":"test patient",
          "extension":"png",
          "thumbnail":"iVBORw0KGgoAAAANSUhEUgAAAG4AAABuAQAAAADuIBtWAAAABGdBTUEAALGP\nC/xhBQAAAAJiS0dEAAHdihOkAAAAB3RJTUUH4gEQCjcT4w8KOgAAABVJREFU\nOMtjYBgFo2AUjIJRMAroAQAGcgABdoTxvAAAACV0RVh0ZGF0ZTpjcmVhdGUA\nMjAxOC0wMS0xNlQxNTo1NToxOS0wNTowMG8EODEAAAAldEVYdGRhdGU6bW9k\naWZ5ADIwMTgtMDEtMTZUMTU6NTU6MTktMDU6MDAeWYCNAAAAAElFTkSuQmCC\n"
        }
      ]
    }
    

    HTTP Request

    To retrieve the list of a patient's current list of documents, make a request to:

    GET {server_url}/api/v1/patients/{patient_id}/documents

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Customer Documents - Show

    curl -X GET {server_url}/api/v1/patients/{patient_id}/documents/{document_id} \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/patients/{patient_id}/documents/{document_id}',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "id":1,
      "mime_type":"image/png",
      "record_type":"Patient Record",
      "upload_date":"2018-01-16T20:51:06+00:00",
      "document_name":"DOGE.png",
      "upload_by":"test patient",
      "extension":"png",
      "thumbnail":"iVBORw0KGgoAAAANSUhEUgAAAG4AAABuAQAAAADuIBtWAAAABGdBTUEAALGP\nC/xhBQAAAAJiS0dEAAHdihOkAAAAB3RJTUUH4gEQCjcT4w8KOgAAABVJREFU\nOMtjYBgFo2AUjIJRMAroAQAGcgABdoTxvAAAACV0RVh0ZGF0ZTpjcmVhdGUA\nMjAxOC0wMS0xNlQxNTo1NToxOS0wNTowMG8EODEAAAAldEVYdGRhdGU6bW9k\naWZ5ADIwMTgtMDEtMTZUMTU6NTU6MTktMDU6MDAeWYCNAAAAAElFTkSuQmCC\n"
    }
    

    HTTP Request

    To retrieve a specific document, make a request to:

    GET {server_url}/api/v1/patients/{patient_id}/documents/{document_id}

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    document_id true MDLIVE ID for document

    Health Conditions - List

    curl -X GET {server_url}/api/v2/patients/{patient_id}/health_conditions \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/patients/{patient_id}/health_conditions",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "health_conditions": [
        {
          "patient_id": 52,
          "medical_condition": {
            "id": 19,
            "condition": "Headaches",
            "source": "Self Reported",
            "concept_id": "128",
            "snomed": "25064002",
            "icd10": "R51",
            "date_reported": "2017-01-26T09:45:28.000-05:00",
            "last_updated_date": "2017-01-26T09:45:28.000-05:00",
            "active": true
          }
        },
        {
          "patient_id": 52,
          "medical_condition": {
            "id": 28,
            "condition": "Alcohol Dependence",
            "source": "Call Center",
            "concept_id": null,
            "snomed": null,
            "icd10": "F10.20",
            "date_reported": "2017-11-13T15:47:40.000-05:00",
            "last_updated_date": "2017-11-13T15:47:40.000-05:00",
            "active": true
          }
        }
      ],
      "personal_info": {
        "id": 1,
        "user_id": 52,
        "access_code": "DTC 949D38 76",
        "blood_type": "A+",
        "organ_donor": false,
        "photo_file_name": "Screen_Shot_2016-06-28_at_5.07.36_PM.png",
        "photo_content_type": "image\/png",
        "photo_file_size": 270649,
        "height_feet": 6,
        "height_inches": 11,
        "weight": 195,
        "updated_at": "2018-01-18T16:23:44.000-05:00",
        "created_at": "2016-07-06T16:36:04.000-04:00",
        "status": null,
        "birth_height": null,
        "birth_weight": 12.1,
        "is_pregnant": false,
        "is_breast_feeding": false,
        "systolic_bp": null,
        "diastolic_bp": null,
        "head_circumference": null,
        "updated_by": 52,
        "menstrual_cycle": "two weeks",
        "alternate_visit_option": "Seen my provider in person",
        "do_you_have_primary_care_physician": false,
        "photo": {
          "url": "\/system\/photos\/1\/original\/Screen_Shot_2016-06-28_at_5.07.36_PM.png",
          "medium": {
            "url": "\/system\/photos\/1\/medium\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          },
          "small": {
            "url": "\/system\/photos\/1\/small\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          },
          "thumb": {
            "url": "\/system\/photos\/1\/thumb\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          }
        }
      },
      "evr_medications": [
        {
          "id": 2,
          "name": "Vitamin C",
          "dosage": "",
          "frequency": "Once Daily",
          "quantity": 1,
          "source": "Self Reported",
          "current": false
        },
        {
          "id": 1,
          "name": "Aspirin",
          "dosage": "",
          "frequency": "Once Daily",
          "quantity": 1,
          "source": "Self Reported",
          "current": false
        }
      ],
      "allergies": [
        {
          "id": 1,
          "name": "penicillin",
          "severity": "Mild",
          "active": null,
          "reaction": "rashes",
          "source": "Self Reported",
          "current": null
        }
      ],
      "source_for_ccd": "DTC Physician Visit",
      "is_taking_medication": "Yes",
      "has_allergies": "Yes",
      "external_reported_surgeries": [
      ],
      "surgeries_taken": [
        {
          "id": 1,
          "name": "Appendectomy",
          "year": "2013"
        }
      ],
      "had_surgeries": "Yes",
      "has_medical_conditions": "Yes",
      "pediatric_profile": {
      },
      "pediatric_profile_completed": true,
      "skip_health_history": false
    }
    

    Returns an aggregate health conditions report for a given patient.

    HTTP Request

    GET {server_url}/api/v2/patients/{patient_id}/health_conditions

    This request must include a valid User JWT token, please see our documentation

    Header Parameters

    Parameter Default
    Authorization Bearer {jwt_token}
    Content-type application/json
    Accept application/json

    URL Parameters

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Health History - Create/Update

    curl -X POST {server_url}/api/v2/patients/{patient_id}/health_history \
      -H "Content-type: application/json" \
      -H "Authorization: Bearer {jwt_token}" \
      -H "Accept: application/json" \
      -d '{
            "health_history": {
              "medical_history": {
                "allergies": true,
                "medications": true,
                "surgeries": true,
                "medical_conditions": true
              },
              "personal_information": {
                "height_feet": 5,
                "height_inches": 4,
                "weight": 120,
                "is_breast_feeding": true,
                "is_pregnant": true,
                "menstrual_cycle": "9/19/2016"
              },
              "allergy": [{
                "name": "Bee Pollen",
                "severity": "Severe",
                "reaction": "Sneezing and Coughing"
              }],
              "medication": [{
                "name": "Hydrocortisone Ace (Topical)",
                "current": true,
                "frequency": "twice daily"
              }],
              "surgery": [{
                "name": "Hip Replacement",
                "surgery_year": 2015
              }],
              "medical_condition": [{
                "condition": "Ear Pain",
                "source": "Self Reported",
                "concept_id": "64",
                "snomed": "267102003",
                "icd10": "R07.0"
              }],
              "pediatric_profile": {
                "Birth complications": false,
                "Birth complications explanation": "Some explanation of birth complications",
                "Bottle Fed": false,
                "Breast Fed": false,
                "Breathing problems": false,
                "Childcare outside home": false,
                "Colic": false,
                "Current Diet": "null",
                "Delivery Type": "null",
                "Feeding Problems": false,
                "Immunization up to date?": false,
                "Infections": false,
                "Jaundice": false,
                "Last shot": "Yesterday",
                "Newborn complications": true,
                "Newborn complications explanation": "Some explanation of newborn complications",
                "Siblings": false,
                "Smoking exposure": false,
                "Current weight in lbs.": 11
              }
          }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/health_history",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}",
        "Accept" => "application/json"
      },
      :payload => {
        health_history: {
          medical_history: {
            allergies: false,
            medications: true,
            surgeries: false,
            medical_conditions: false
          },
          personal_information: {
            height_feet: 5,
            height_inches: 4,
            weight: 120,
            is_breast_feeding: false,
            is_pregnant: false,
            menstrual_cycle: "9/19/2016"
          },
          allergy: [{
            name: "Bee Pollen",
            severity: "Severe",
            reaction: "Sneezing and Coughing"
          }],
          medication: [{
            name: "Hydrocortisone Ace (Topical)",
            current: true,
            frequency: "twice daily"
          }],
          surgery: [{
            name: "Hip Replacement",
            surgery_year: 2015
          }],
          medical_condition: [{
            condition: "Ear Pain",
            source: "Self Reported",
            concept_id: "64",
            snomed: "267102003",
            icd10: "R07.0"
          }],
          pediatric_profile: {
            birth_complications: false,
            birth_complications_explanation: "Some explanation of birth complications",
            bottle_fed: false,
            breast_fed: false,
            breathing_problems: false,
            childcare_outside_home: false,
            colic: false,
            current_diet: "null",
            delivery_type: "null",
            feeding_problems: false,
            immunization_up_to_date: false,
            infections: false,
            jaundice: false,
            last_shot: "Yesterday",
            newborn_complications: true,
            newborn_complications_explanation: "Some explanation of newborn complications",
            siblings: false,
            smoking_exposure: false,
            current_weight_in_lbs: 11
          }
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "health_conditions": [
        {
          "patient_id": 52,
          "medical_condition": {
            "id": 19,
            "condition": "Headaches",
            "source": "Self Reported",
            "concept_id": "128",
            "snomed": "25064002",
            "icd10": "R51",
            "date_reported": "2017-01-26T09:45:28.000-05:00",
            "last_updated_date": "2017-01-26T09:45:28.000-05:00",
            "active": true
          }
        },
        {
          "patient_id": 52,
          "medical_condition": {
            "id": 28,
            "condition": "Ear Pain",
            "source": "Self Reported",
            "concept_id": 64,
            "snomed": 267102003,
            "icd10": "R07.0",
            "date_reported": "2017-11-13T15:47:40.000-05:00",
            "last_updated_date": "2017-11-13T15:47:40.000-05:00",
            "active": true
          }
        }
      ],
      "personal_info": {
        "id": 1,
        "user_id": 52,
        "access_code": "DTC 949D38 76",
        "blood_type": "A+",
        "organ_donor": false,
        "photo_file_name": "Screen_Shot_2016-06-28_at_5.07.36_PM.png",
        "photo_content_type": "image\/png",
        "photo_file_size": 270649,
        "height_feet": 5,
        "height_inches": 4,
        "weight": 120,
        "updated_at": "2018-01-18T16:23:44.000-05:00",
        "created_at": "2016-07-06T16:36:04.000-04:00",
        "status": null,
        "birth_height": null,
        "birth_weight": 12.1,
        "is_pregnant": false,
        "is_breast_feeding": false,
        "systolic_bp": null,
        "diastolic_bp": null,
        "head_circumference": null,
        "updated_by": 52,
        "menstrual_cycle": "two weeks",
        "alternate_visit_option": "Seen my provider in person",
        "do_you_have_primary_care_physician": false,
        "photo": {
          "url": "\/system\/photos\/1\/original\/Screen_Shot_2016-06-28_at_5.07.36_PM.png",
          "medium": {
            "url": "\/system\/photos\/1\/medium\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          },
          "small": {
            "url": "\/system\/photos\/1\/small\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          },
          "thumb": {
            "url": "\/system\/photos\/1\/thumb\/Screen_Shot_2016-06-28_at_5.07.36_PM.png"
          }
        }
      },
      "evr_medications": [
        {
          "id": 2,
          "name": "Vitamin C",
          "dosage": "",
          "frequency": "Once Daily",
          "quantity": 1,
          "source": "Self Reported",
          "current": false
        },
        {
          "id": 1,
          "name": "Hydrocortisone Ace (Topical)",
          "dosage": "",
          "frequency": "Twice Daily",
          "quantity": 1,
          "source": "Self Reported",
          "current": true
        }
      ],
      "allergies": [
        {
          "id": 1,
          "name": "Bee Pollen",
          "severity": "Severe",
          "active": true,
          "reaction": "Sneezing and Coughing",
          "source": "Self Reported",
          "current": true
        }
      ],
      "source_for_ccd": "DTC Physician Visit",
      "is_taking_medication": "Yes",
      "has_allergies": "Yes",
      "external_reported_surgeries": [
      ],
      "surgeries_taken": [
        {
          "id": 1,
          "name": "Hip Replacement",
          "year": "2015"
        }
      ],
      "had_surgeries": "Yes",
      "has_medical_conditions": "Yes",
      "pediatric_profile": {
        "Birth complications": "No",
        "Birth complications explanation": "Some explanation of birth complications",
        "Bottle Fed": "No",
        "Breast Fed": "No",
        "Breathing problems": "No",
        "Childcare outside home": "No",
        "Colic": "No",
        "Current Diet": "Null",
        "Delivery Type": "Null",
        "Feeding Problems": "No",
        "Immunization up to date?": "Yes",
        "Infections": "Yes",
        "Jaundice": "No",
        "Last shot": "Yesterday",
        "Newborn complications": "Yes",
        "Newborn complications explanation": "Some explanation of newborn complications",
        "Siblings": "Yes",
        "Smoking exposure": "No",
        "Current weight in lbs.": "11"},
      "pediatric_profile_completed": true,
      "skip_health_history": false
    }
    

    Create or update the health history questions for a given patient.

    HTTP Request

    POST {server}/api/v2/patients/{patient_id}/health_history

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Parameter                                                         Type Required Description
    health_history hash of objects true Parent attribute for hash of medical history and personal information objects
    ↳ medical_history hash of objects true Parent attribute for hash of medical history objects
        ↳ allergies boolean true True or False answer to if the patient has any allergies
        ↳ medications boolean true True or False answer to if the patient is taking any medications
        ↳ surgeries boolean true True or False answer to if the patient has had any surgeries
        ↳ medical_conditions boolean true True or False answer to if the patient has any medical conditions
    ↳ personal_information hash of objects true Parent attribute for hash of pcp questions
        ↳ height_feet integer true Height of patient in feet
        ↳ height_inches integer true Height of patient in inches
        ↳ weight integer true Weight of patient in pounds
        ↳ is_breast_feeding boolean conditionally true True or False answer to if the patient is currently breast feeding.
    Only required when patient:
    gender = female and age >= 13.
        ↳ is_pregnant boolean conditionally true True or False answer to if the patient is currently pregnant.
    Only required when patient:
    gender = female and age >= 13.
        ↳ menstrual_cycle date false Date of last menstrual cycle. Recommended to be collected if the patient is female and of the age of 13 or greater.
    ↳ allergy array of objects conditionally true Parent attribute for array of patient allergies
    Only required when the allergies flag under medical_history is true.
        ↳ name string conditionally true Description of allergy retrieved from search
    Only required when the allergies flag under medical_history is true.
        ↳ severity string conditionally true Description of severity should be one of:
    • Not Sure
    • Mild
    • Moderate
    • Severe

    Only required when the allergies flag under medical_history is true.
        ↳ reaction string conditionally true Description of reaction
    Only required when the allergies flag under medical_history is true.
    ↳ medication array of objects conditionally true Parent attribute for array of patient medications
    Only required when the medications flag under medical_history is true.
        ↳ name string conditionally true Description of medication
    Only required when the medications flag under medical_history is true.
        ↳ current boolean false Permitted values are true, false
        ↳ frequency string false Frequency of the medication
        ↳ med_id string false Unique ID of the medication
    ↳ surgery array of objects conditionally true Parent attribute for array of patient surgeries
    Only required when the surgeries flag under medical_history is true.
        ↳ name string conditionally true Name of the surgery/procedure
    Only required when the surgeries flag under medical_history is true.
        ↳ surgery_year integer conditionally true Year of surgery/procedure
    Only required when the surgeries flag under medical_history is true.
    ↳ medical_condition array of objects conditionally true Parent attribute for patient medical condition
    Only required when the medical_conditions flag under medical_history is true.
        ↳ condition string conditionally true Description of condition
    Only required when the medical_conditions flag under medical_history is true.
        ↳ source string false 'Self Reported'
        ↳ concept_id string false Concept ID returned in Clinical Concepts search
        ↳ snomed string false SNOMED returned in Clinical Concepts search
        ↳ icd10 string false ICD-10 code returned in Clinical Concepts search
    ↳ pediatric_profile hash of objects conditionally true Parent attribute for hash of pediatric profile objects
    Only required when patient:
    0 < age < 13.
        ↳ Birth complications boolean conditionally true True or False answer to if patient had birth complications
    Only required when patient:
    0 < age < 2.
        ↳ Birth complications explanation string false A description of the patient's birth complications. Max length of 255 characters.
        ↳ Bottle Fed boolean false True of False answer to if patient was bottle fed
        ↳ Breast Fed boolean false True or False answer to if patient was breastfed
        ↳ Breathing problems boolean false True or False answer to if patient had breathing problems
        ↳ Childcare outside home boolean conditionally true True or False answer to if patient was cared for outside home
    Only required when patient:
    0 < age < 13.
        ↳ Colic boolean false True or False answer to if patient had Colic
        ↳ Current Diet string conditionally true Description of patient's current diet
    Only required when patient:
    0 < age < 2.
        ↳ Delivery Type string false Description of delivery type
        ↳ Feeding Problems boolean false True or False answer to if patient had feeding problems
        ↳ Immunization up to date? boolean conditionally true True or False answer to if patient immunization is up to date
    Only required when patient:
    0 < age < 13.
        ↳ Infections boolean false True or False answer to if patient had infections
        ↳ Jaundice boolean false True or False answer to if patient had jaundice
        ↳ Last shot string conditionally true When the patient's last shot was. Max length of 255 characters.
    Only required when the Immunization up to date? flag is false.
        ↳ Newborn complications boolean false True or False answer to if patient had newborn complications
        ↳ Newborn complications explanation string false Description of patient's newborn complications
        ↳ Siblings boolean conditionally true True or False answer if patient has siblings
    Only required when patient:
    0 < age < 13.
        ↳ Smoking exposure boolean conditionally true True or False answer to if patient had smoking exposure
    Only required when patient:
    0 < age < 13.
        ↳ Current weight in lbs. integer conditionally true The patient's current weight in lb. Must be integer, no decimals allowed
    Only required when patient:
    0 < age < 13.

    Insurance Payers - List

    curl -X GET {server_url}/api/v1/insurance_payers \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/insurance_payers",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
        "insurance_payers": [
            {
                "id": 33,
                "description": "Aetna  Insurance"
            },
            {
                "id": 5,
                "description": "BCBS Florida"
            },
            {
                "id": 191,
                "description": "BCBS Montana"
            },
            {
                "id": 28,
                "description": "BCBS North Carolina"
            },
            {
                "id": 29,
                "description": "BCBS Oklahoma"
            },
            {
                "id": 27,
                "description": "BLUE SHIELD ILLINOIS"
            },
            {
                "id": 26,
                "description": "BLUE SHIELD PENN HIGHMARK BCBS"
            },
            {
                "id": 37,
                "description": "BLUE SHIELD TENNESSEE"
            },
            {
                "id": 77,
                "description": "Carefirst Admin"
            },
            {
                "id": 166,
                "description": "CIGNA "
            },
            {
                "id": 65,
                "description": "EXCELLUS BCBS"
            },
            {
                "id": 31,
                "description": "HMO BLUE TEXAS"
            },
            {
                "id": 3,
                "description": "HUMANA CARE PLAN"
            },
            {
                "id": 35,
                "description": "IBC - INDEPEN. BLUE CROSS PERSONAL CHOICE"
            },
            {
                "id": 93,
                "description": "UNITED HEALTHCARE "
            }
        ]
    }
    

    Returns a list of insurance payers we accept.

    HTTP Request

    GET {server_url}/api/v1/insurance_payers

    This request must include a valid User JWT token, please see our documentation

    Header Parameters

    Parameter Default
    Authorization Bearer {jwt_token}
    Content-type application/json
    Accept application/json

    Insurances - Create

    curl -X POST {server_url}/api/v1/patients/{patient_id}/insurances
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -H "Accept: application/json"
    -d '{
          "insurance": {
            "insurance_details": {
              "insurance_payer_id": 27,
              "member_id": "MDL684088116",
              "is_dependent": false
            },
            "primary_insurance_details": {
              "relationship": "",
              "first_name":  "",
              "last_name": "",
              "gender": "",
              "dob": "",
              "member_id": ""
            }
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/insurances",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}",
        "Accept" => "application/json"
      },
      :payload => {
        "insurance" => {
          "insurance_details" => {
            "insurance_payer_id" => 27,
            "member_id" => "MDL684088116",
            "is_dependent" => false
          },
          "primary_insurance_details": {
            "relationship" => "",
            "first_name" => "",
            "last_name" => "",
            "gender" => "",
            "dob" => "",
            "member_id" => ""
          }
        }
      }
    ).execute
    

    When the patient is eligible for telemedicine visits, the above command returns JSON structured like this:

    {
        "insurance": {
            "eligibility_errors": [],
            "eligible": true,
            "id": 2,
            "insurance_payer_id": 27,
            "is_dependent": false,
            "member_id": "MDL684088116",
            "primary_insurance": null
        }
    }
    

    When the patient is ineligible for telemedicine visits, the above command returns JSON structured like this:

    {
        "insurance": {
            "eligibility_errors": [
                {
                    "code": "incorrect_subscriber_id",
                    "message": "Invalid/Missing Subscriber/Insured ID"
                }
            ],
            "eligible": false,
            "id": 2,
            "insurance_payer_id": 27,
            "is_dependent": false,
            "member_id": "MDL684088116",
            "primary_insurance": null
        }
    }
    

    To add or update an insurance payer to a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v1/patients/{patient_id}/insurances

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Parameter Type Required Description
    insurance object true Object containing insurance information
    ↳  insurance_detail object true Object containing patient's insurance details
    ↳↳  insurance_payer_id integer true MDLIVE ID of the insurance payer
    ↳↳  member_id string true Patient's Insurance Member ID
    ↳↳  is_dependent boolean true Patient's coverage type
    ↳  primary_insurance_details object false (true if dependent) Object containing primary insurance details
    ↳↳  first_name string false (true if dependent) Primary member's first name
    ↳↳  last_name string false (true if dependent) Primary member's last name
    ↳↳  gender string false (true if dependent) Primary member's gender
    ↳↳  dob string false (true if dependent) Primary member's birthdate
    ↳↳  member_id string false (true if dependent) Primary member's Insurance Member ID

    Languages

    Use the table below to find the language_id which can be used when Searching for Providers

    ID Language Name Alpha-3 Code
    1 English eng
    2 Spanish spa
    3 French fre
    4 German ger
    5 Italian ita
    7 Polish pol
    8 Korean kor
    9 Vietnamese vie
    11 Russian rus
    12 Chinese chi
    14 Arabic ara
    15 Hindi hin
    16 Persian per
    17 Malayalam mal
    18 Hebrew heb
    19 Yiddish yid
    20 Greek gre
    21 Gujarati guj
    22 Haitian Creole hat
    23 Igbo ibo
    24 Lithuanian lit
    25 Panjabi pan
    26 Pushto pus
    27 Romanian rum
    28 Telugu tel
    29 Ukrainian ukr
    30 Urdu urd
    curl -X GET {server_url}/api/v1/clinical_concepts
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{ "search": {
            "term": "throat",
            "limit": "3"
          }
        }'
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/clinical_concepts",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => { "search"=> {
                      "term"=> "throat",
                      "limit"=> "3"
                    }
                  }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "clinical_concepts": [
        {
          "concept_id": 64,
          "concept_type": "Symptom",
          "title": "Throat Pain",
          "icd10": "R07.0",
          "snomed": "267102003"
        },
        {
          "concept_id": 3539,
          "concept_type": "Symptom",
          "title": "Throat Redness (or Red Spots)",
          "icd10": "J02.9",
          "snomed": "126662008"
        },
        {
          "concept_id": 3544,
          "concept_type": "Symptom",
          "title": "Throat Swelling (Swollen Tonsils)",
          "icd10": "R22.1",
          "snomed": "421581006"
        }
      ]
    }
    

    MDLIVE offers the ability to search against medical conditions to be used for offering auto-complete suggestions as a patient is creating an appointment or a medical condition. To search, make a request to:

    HTTP Request

    GET {server_url}/api/v1/clinical_concepts

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are accepted when searching medical conditions.

    Query String Parameters

    Attribute Required Description
    search true Parent attribute for search criteria
    ↳ term true The term to match (string)
    ↳ limit false Limit size of the result set, default size is 10

    Medical Conditions - Create

    curl -X POST {server_url}/api/v1/patients/{patient_id}/medical_conditions
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{
          "medical_condition": {
            "condition": "Throat Pain",
            "source": "Self Reported",
            "concept_id": "64",
            "snomed": "267102003",
            "icd10": "R07.0"
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/medical_conditions",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {
                     "medical_condition"=> {
                       "condition"=> "Throat Pain",
                       "source"=> "Self Reported",
                       "concept_id"=> "64",
                       "snomed"=> "267102003",
                       "icd10"=> "R07.0"
                     }
                   }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "patient_id": 111,
      "medical_condition": {
        "id": 123,
        "condition": "Throat Pain",
        "source": "Self Reported",
        "concept_id": "64",
        "snomed": "267102003",
        "icd10": "R07.0",
        "date_reported": "2017-11-13T15:47:40.000-05:00",
        "last_updated_date": "2017-11-13T15:47:40.000-05:00",
        "active": true
      }
    }
    

    To create a medical condition for a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v1/patients/{patient_id}/medical_conditions

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when creating a medical condition. To search for the condition and retrieve needed parameter values, reference clinical concepts - search.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    medical_condition true Parent attribute for condition
    ↳ condition true Description of condition
    ↳ source false 'Self Reported'
    ↳ concept_id false Concept ID returned in Clinical Concepts search
    ↳ snomed false SNOMED returned in Clinical Concepts search
    ↳ icd10 false ICD-10 code returned in Clinical Concepts search

    Medical Conditions - Delete

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/medical_conditions/{medical_condition_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/medical_conditions/{medical_condition_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove a medical condition from a patient's list of conditions, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/medical_conditions/{medical_condition_id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when removing a medical condition.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    id true ID of patient's medical condition

    Medical Conditions - List

    curl -X GET {server_url}/api/v1/patients/{patient_id}/medical_conditions
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/medical_conditions",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "medical_conditions": [
        {
          "patient_id": 111,
          "medical_condition": {
            "id": 123,
            "condition":"Anemia - Aplastic",
            "source":"Self Reported",
            "concept_id": "526",
            "snomed": "306058006",
            "icd10": "D61.9",
            "date_reported": "2017-11-18T12:45:28.000-05:00",
            "last_updated_date": "2017-11-18T12:45:28.000-05:00",
            "active": true
          }
        },
        {
          "patient_id": 111,
          "medical_condition":{
            "id":12345,
            "condition":"Asthma",
            "source":"Dr Jane Doe",
            "concept_id": "3488",
            "snomed": "195967001",
            "icd10": "J45.909",
            "date_reported": "2017-11-13T15:47:40.000-05:00",
            "last_updated_date": "2017-11-13T15:47:40.000-05:00",
            "active": true
          }
        }
      ]
    }
    

    To retrieve the list of a patient's current list of medical conditions, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/medical_conditions

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required to retrieve the list of patient's medical conditions.

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Medications - Create

    curl -X POST {server_url}/api/v2/patients/{patient_id}/medications \
      -H "Content-type: application/json" \
      -H "Authorization: Bearer {jwt_token}" \
      -H 'Accept: application/json' \
      -d '{
        "medication": {
          "name": "Ibuprofen PM 200 mg-25 mg capsule",
          "current": true,
          "dosage": "1",
          "frequency": "Once Daily",
          "ndc_id": "00363061121"
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/medications",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept'  => 'application/json'
      },
      :payload => {
        medication: {
          name: "Ibuprofen PM 200 mg-25 mg capsule",
          current: true,
          dosage: "1",
          frequency: "Once Daily",
          ndc_id: "00363061121"
        }
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "medication": {
        "id": 29,
        "name": "Ibuprofen PM 200 mg-25 mg capsule",
        "dosage": "1",
        "frequency": "Once Daily",
        "quantity": 1,
        "source": "Self Reported",
        "current": true,
        "ndc_id": "00363061121"
      }
    }
    

    To add a medication to a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v2/patients/{patient_id}/medications

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer example.jwttoken

    The following parameters are required when creating a medication. To search for the medication and retrieve needed parameter values, reference medications - search.

    URL Parameters

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body

    Attribute Required Description
    medication true Parent attribute for medication
    ↳ name true Name of the medication (string)
    ↳ current false Permitted values are true, false
    ↳ dosage false Dosage of the medication (string)
    ↳ frequency false Frequency of the medication (string)
    ↳ med_id false Unique ID of the medication
    ↳ ndc_id false NDC ID of the medication

    Medications - Delete

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/medications/{medication_id} \
      -H "Content-type: application/json" \
      -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/medications/{medication_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove a medication from a patient's list of medications, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/medications/{medication_id}

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Medications - Delete Using NDC

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/medications/ndc/{ndc_id} \
      -H "Content-type: application/json" \
      -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/medications/ndc/{ndc_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove a medication from a patient's list of medications using the NDC Id, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/medications/ndc/{ndc_id}

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when removing an allergy.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    ndc_id true NDC Id of medication

    Medications - List

    curl -X GET {server_url}/api/v1/patients/{patient_id}/medications \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-type: application/json' \
      -H 'Accept: application/json' \
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/medications",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "medications": [
        {
          "id":2,
          "name": "Ibuprofen PM 200 mg-25 mg capsule",
          "dosage": "1",
          "frequency": "Once Daily",
          "quantity":1,
          "source": "Self Reported",
          "current":false,
          "ndc_id": "00363061121"
        }
      ]
    }
    

    To retrieve the list of patient's current active medications, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/medications

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}
    curl -X POST {server_url}/api/v2/medications/search \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-type: application/json' \
      -H 'Accept: application/json' \
      -d '{
        "search": {
          "term": "ibuprofen 50",
          "limit": 10
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/medications/search",
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      },
      :payload => {
        search: {
          term: "ibuprofen 50",
          limit: 10
        }
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "medications": [
        {
          "id": 82465,
          "name": "ibuprofen 50 mg chewable tablet",
          "description": "ibuprofen 50 mg chewable tablet",
          "med_id": 82465
        },
        {
          "id": 78829,
          "name": "ibuprofen 50 mg/1.25 mL oral drops,suspension",
          "description": "ibuprofen 50 mg/1.25 mL oral drops,suspension",
          "med_id": 78829
        }
      ]
    }
    

    Searches for medications starting with term. Results must not exceed limit.

    HTTP Request

    POST {server_url}/api/v2/medications/search

    This request must include a valid JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Request Body

    The following parameters can be used to search for a medication.

    Attribute Required Description
    search true Parent attribute for search criteria
    ↳ term true The term to match (string)
    ↳ limit false Limit size of the result set, default size is 10, max size is 50

    Messages - Retrieve System Messages for a Patient

    curl -X GET {server_url}/api/v1/patients/{patient_id}/messages/system?page=1&per=5
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/messages/system?page1&per=5",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
    ).execute
    

    The above command returns JSON structured like this:

    {
      "messages": [
        {
          "id": 99,
          "date_time": "2018-01-10T00:42:57+00:00",
          "from": "System Controller",
          "from_id": 2,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Appointment Scheduled",
          "message": "You have scheduled an appointment with Dr. Travis C Stork at 01/09/2018 at 07:43 PM (EST)",
          "unread_status": true,
          "replied_to_message_id": null
        },
        {
          "id": 97,
          "date_time": "2018-01-09T16:36:20+00:00",
          "from": "System Controller",
          "from_id": 2,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Appointment Scheduled",
          "message": "You have scheduled an appointment with Dr. Travis C Stork at 01/09/2018 at 11:37 AM (EST)",
          "unread_status": true,
          "replied_to_message_id": null
        },
        {
          "id": 94,
          "date_time": "2017-12-29T21:21:03+00:00",
          "from": "System Controller",
          "from_id": 2,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Appointment Scheduled",
          "message": "You have scheduled an appointment with Dr. Travis C Stork at 12/29/2017 at 09:30 PM (EST)",
          "unread_status": false,
          "replied_to_message_id": null
        },
        {
          "id": 92,
          "date_time": "2017-12-29T21:16:00+00:00",
          "from": "System Controller",
          "from_id": 2,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Appointment Scheduled",
          "message": "You have scheduled an appointment with Dr. Travis C Stork at 12/29/2017 at 07:30 PM (EST)",
          "unread_status": true,
          "replied_to_message_id": null
        },
        {
          "id": 64,
          "date_time": "2017-12-27T16:52:15+00:00",
          "from": "System Controller",
          "from_id": 2,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Appointment Scheduled",
          "message": "You have scheduled an appointment with Dr. Travis C Stork at 12/29/2017 at 11:15 AM (EST)",
          "unread_status": true,
          "replied_to_message_id": null
        }
      ],
      "unread": 25
    }
    

    A patient can view messages from the MDLIVE system. The view a paginated list of system messages, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/messages/system?page=1&per=5

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    page false Page #
    per false # of messages per page

    Messages - Retrieve All Contacts

    curl -X GET {server_url}/api/v1/patients/{patient_id}/messages/contacts
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/messages/contacts",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
    ).execute
    

    The above command returns JSON structured like this:

    {
      "contacts": [
        {
          "id": 35,
          "prefix": "",
          "fullname": "demoprovider1 demoprovider1",
          "gender": "Male",
          "photo_url": "/users/35/photo",
          "specialty": "General Practice"
        },
        {
          "id": 37,
          "prefix": null,
          "fullname": "demoprovider3 demoprovider3",
          "gender": "Male",
          "photo_url": "/users/37/photo",
          "specialty": "General Practice"
        },
        {
          "id": 38,
          "prefix": null,
          "fullname": "demoprovider4 demoprovider4",
          "gender": "Male",
          "photo_url": "/users/38/photo",
          "specialty": "General Practice"
        }
      ]
    }
    

    A patient can contact providers that they have previously seen or are scheduled to see. For a list of these providers, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/messages/contacts

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Messages - Retrieve All Conversations for a Patient

    curl -X GET {server_url}/api/v2/patients/{patient_id}/messages/conversations
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/patients/{patient_id}/messages/conversations",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
    ).execute
    

    The above command returns JSON structured like this:

    { conversations:
      [
        {
          "provider": {
            "id": 37,
            "prefix": null,
            "fullname": "demoprovider3 demoprovider3",
            "gender": "Male",
            "photo_url": "/users/37/photo",
            "specialty": "General Practice"
          },
          "unread_messages": null,
          "recent_message_body": "Hello, I am waiting for you to start the appointment",
          "last_message_at": "2018-01-22T10:38:07.000-05:00",
          "last_message_by": "patient"
        },
        {
          "provider": {
            "id": 4,
            "prefix": "DR",
            "fullname": "Travis C Stork",
            "gender": "Male",
            "photo_url": "/users/4/photo",
            "specialty": "General Practice"
          },
          "unread_messages": 2,
          "recent_message_body": "You can take 1 600mg every 4 hours as needed for pain.",
          "last_message_at": "2018-01-23T08:50:39.000-05:00",
          "last_message_by": "provider"
        }
      ]
    }
    

    To fetch a list of all the patient's conversations with various providers, make a request to:

    HTTP Request

    GET {server_url}/api/v2/patients/{patient_id}/messages/conversations

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Messages - Retrieve A Conversation between a Patient and Provider

    curl -X GET {server_url}/api/v1/patients/{patient_id}/providers/{provider_id}/conversation?page=1&per=5
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/providers/{provider_id}/conversation?page=1&per=5",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
    ).execute
    

    The above command returns JSON structured like this:

    {
      "messages": [
        {
          "id": 106,
            "date_time": "2018-01-23T13:50:39+00:00",
            "from": "DR Travis C Stork",
            "from_id": 4,
            "to": "Test Marino",
            "to_id": 3,
            "subject": "Re: Prescription",
            "message": "You can take 1 600mg every 4 hours as needed for pain.",
            "unread_status": true,
            "reply_allowed": true
        },
        {
          "id": 105,
          "date_time": "2018-01-23T02:33:13+00:00",
          "from": "Test Marino",
          "from_id": 3,
          "to": "DR Travis C Stork",
          "to_id": 4,
          "subject": "Prescription",
          "message": "Hello, I received a prescription for extra strength Ibuprofen. How often can I take the medicine?",
          "unread_status": false,
          "reply_allowed": false
        }
        {
          "id": 104,
          "date_time": "2018-01-23T02:32:39+00:00",
          "from": "DR Travis C Stork",
          "from_id": 4,
          "to": "Test Marino",
          "to_id": 3,
          "subject": "Start Appointment",
          "message": "Hello, I am ready for your appointment",
          "unread_status": true,
          "reply_allowed": true
        }
      ]
    }
    

    To retrieve a paginated conversation thread between a patient and a particular provider, make a request to:

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/providers/{provider_id}/conversation

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    provider_id true MDLIVE ID for provider
    page false Page #
    per false # of messages per page

    Messages - Create a Message from a Patient

    curl -X POST {server_url}/api/v1/patients/{patient_id}/messages
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
      -d '{
        "message": {
          "message_type": "follow_up",
          "to_id": 4,
          "subject": "Prescription",
          "message": "Hello, I received a prescription for extra strength Ibuprofen. How often can I take the medicine?",
          "replied_to_message_id": 104
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/messages",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
      :payload => {
        message: {
          message_type: "follow_up",
          to_id: 4,
          subject: "Prescription",
          message: "Hello, I received a prescription for extra strength Ibuprofen. How often can I take the medicine?",
          replied_to_message_id: 104
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "message": {
        "id": 105,
        "date_time": "2018-01-23T02:33:13+00:00",
        "from": "Test Marino",
        "from_id": 3,
        "to": "Travis C Stork",
        "to_id": 4,
        "subject": "Prescription",
        "message": "Hello, I received a prescription for extra strength Ibuprofen. How often can I take the medicine?",
        "unread_status": true,
        "replied_to_message_id": 104
      }
    }
    

    Patients can only send messages to an authorized provider. A provider is authorized if the patient has a previous or upcoming appointment with that provider. To create a new message, make a request to:

    HTTP Request

    POST {server}/api/v1/patients/{patient_id}/messages

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Parameter Type Required Description
    message object true Object containing the content of a message
    ↳  message_type string true Type of message. For messages to providers, use the type: follow_up
    ↳  to_id integer true MDLIVE ID of the provider recipient
    ↳  subject string true Text subject of message
    ↳  message string true Text body of message
    ↳  replied_to_message_id integer false If a message is created in response to another message from the provider, the previous message's ID must be supplied

    Messages - Mark A Message as Read

    curl -X PUT {server_url}/api/v1/patients/{patient_id}/messages/{message_id}/mark_read
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :put,
      :url => "{server_url}/api/v1/patients/{patient_id}/messages/{messages_id}/mark_read",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      }
    ).execute
    

    The above command will return a 204 status code with no content in the body.

    A patient can only mark messages sent to them as read. To mark a message as read, make a request to:

    HTTP Request

    PUT {server}/api/v1/patients/{patient_id}/messages/{message_id}/mark_read

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    message_id true MDLIVE ID for message

    Patients - Retrieve a patient

    curl {server_url}/api/v2/patients/{patient_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer 34a2sample-user-token"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/patients/{patient_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "patient_profile": {
        "id": 42,
        "fullname": "John Doe",
        "email": "johndoe@md.com",
        "gender": "Male",
        "age": 32,
        "birthdate": "1985-09-15",
        "affiliation_id": 96,
        "security_id": null,
        "primary_care_physician": null,
        "unpaid_balance": 0,
        "user_status_id": 1,
        "username": "johndoe",
        "first_name": "John",
        "last_name": "Doe",
        "address1": "1 ST NW 1",
        "address2": null,
        "city": "Sunrise",
        "state_id": 10,
        "zip": "33324",
        "phone": "7866665555",
        "cell": null,
        "emergency_contact_number": null,
        "us_time_zone_id": 1,
        "language_id": null,
        "registered_date": null,
        "eligible_members": [
        ],
        "parent_id": null,
        "magellan": false,
        "plan_id": 158,
        "therapy_enabled": false,
        "email_confirmed": true,
        "can_add_family_members": true,
        "assist_phone_number": "1-800-400-MDLIVE",
        "parent_authorized": false,
        "is_primary": true,
        "provider_types": [
          [
            3,
            "Family Physician"
          ],
          [
            5,
            "Therapist"
          ],
          [
            6,
            "Psychiatrist"
          ],
          [
            12,
            "Dermatologist"
          ]
        ],
        "unread_message_count": 0,
        "primary_name": null,
        "customer_insurance_parent_detail": null,
        "chat_history_count": 0,
        "user_status": {
          "id": 1,
          "name": "Active",
          "updated_at": "2017-12-15 08:27:33 -0500",
          "created_at": "2017-12-15 08:27:33 -0500"
        },
        "user_vip_flag": null,
        "customer_insurance_detail": null,
        "customer_detail": null,
        "customer_benefit_overuse": null,
        "affiliation": {
          "description": "DTC",
          "id": 96,
          "video_only": false,
          "is_ccp": false,
          "epic_enabled": false,
          "affiliated_doctors_only": false,
          "disallow_membership_card": true,
          "activation_date": null,
          "deactivated_date": null,
          "dependent_registration_disabled": [
          ],
          "affiliated_providers_only_for_agents": false,
          "verify_eligibility": false,
          "name": "DTC",
          "pharmacy_disabled": false,
          "allow_add_family_members": true,
          "request_appointment_enabled": true,
          "phone_only": false,
          "breakthrough_enabled": false,
          "dtc_insurance_enabled": false,
          "insurance_payer": null,
          "privacy_policy_text":"{privacy_policy_text}",
          "informed_consent_text":"{informed_consent_text}",
          "privacy_policy_question":"I have read MDLIVE Medical Group's Privacy Policy and I acknowledge that I have the ability to print a hard copy of the Privacy Policy for my records.",
          "informed_consent_question":"I certify that I have read and accept the terms of MDLIVE Medical Group's Informed Consent."
        },
        "state": {
          "name": "FLORIDA",
          "id": 10
        },
        "pharmacy": {
          "id": 1,
          "name": "CVS/pharmacy #7900",
          "city": "SUNRISE",
          "address1": "10000 W COMMERCIAL BLVD",
          "address2": "",
          "state": "FL",
          "zipcode": "33351",
          "phone": "9547486377",
          "fax": "9547486435",
          "latitude": 26.1935,
          "longitude": -80.2846,
          "twenty_four_hour_flag": false
        },
        "recent_notes": [
        ],
        "family_members": [
          {
            "id": 3,
            "fullname": "John Doe",
            "email": "johndoe@md.com",
            "gender": "Male",
            "age": 32,
            "birthdate": "1987-09-15",
            "user_status_id": 1,
            "parent_id": null,
            "username": "johndoe",
            "first_name": "John",
            "last_name": "Doe",
            "address1": "1 ST NW 1",
            "address2": null,
            "city": "Sunrise",
            "state_id": 10,
            "zip": "33324",
            "phone": "7866665555",
            "cell": null,
            "emergency_contact_number": null,
            "us_time_zone_id": 1,
            "language_id": null,
            "is_authorized": false,
            "is_active": true,
            "email_confirmed": true,
            "image_url": ""
          }
        ],
        "recent_activity_histories": [
        ],
        "chat_histories": [
        ],
        "upcoming_appointments": [
        ],
        "completed_appointments": [
        ],
        "pending_update_appointments": [
        ],
        "requested_appointments": [
        ]
      }
    }
    

    Retrieve the details of an existing patient. You need only supply the unique patient identifier that was returned upon patient registration.

    HTTP Request

    GET {server_url}/api/v2/patients/{patient_id}

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Request Body

    The following parameters are required to retrieve a patient.

    Attribute Required Description
    patient_id true ID of the patient to be retrieved

    Patients - Update a patient

    curl -X PATCH {server_url}/api/v2/patients/{patient_id} \
      -H "Content-type: application/json" \
      -H "Authorization: Bearer {jwt_token}" \
      -H "Accept: application/json" \
      -d '{
           "patient": {
             "first_name": "Test",
             "last_name": "Patient"
           }
         }'
    
    RestClient::Request.new(
      :method => :patch,
      :url => "{server_url}/api/v2/patients/{patient_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}",
        "Accept" => "application/json"
      },
      :payload => {
         patient: {
           first_name: "Test",
           last_name: "Patient"
         }
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "patient_profile": {
        "id": 42,
        "fullname": "Test Patient",
        "email": "johndoe@md.com",
        "gender": "Male",
        "age": 32,
        "birthdate": "1985-09-15",
        "affiliation_id": 96,
        "security_id": null,
        "primary_care_physician": null,
        "unpaid_balance": 0,
        "user_status_id": 1,
        "username": "johndoe",
        "first_name": "Test",
        "last_name": "Patient",
        "address1": "1 ST NW 1",
        "address2": null,
        "city": "Sunrise",
        "state_id": 10,
        "zip": "33324",
        "phone": "7866665555",
        "cell": null,
        "emergency_contact_number": null,
        "us_time_zone_id": 1,
        "language_id": null,
        "registered_date": null,
        "eligible_members": [
        ],
        "parent_id": null,
        "magellan": false,
        "plan_id": 158,
        "therapy_enabled": false,
        "email_confirmed": true,
        "can_add_family_members": true,
        "assist_phone_number": "1-800-400-MDLIVE",
        "parent_authorized": false,
        "is_primary": true,
        "provider_types": [
          [
            3,
            "Family Physician"
          ],
          [
            5,
            "Therapist"
          ],
          [
            6,
            "Psychiatrist"
          ],
          [
            12,
            "Dermatologist"
          ]
        ],
        "unread_message_count": 0,
        "primary_name": null,
        "customer_insurance_parent_detail": null,
        "chat_history_count": 0,
        "user_status": {
          "id": 1,
          "name": "Active",
          "updated_at": "2017-12-15 08:27:33 -0500",
          "created_at": "2017-12-15 08:27:33 -0500"
        },
        "user_vip_flag": null,
        "customer_insurance_detail": null,
        "customer_detail": null,
        "customer_benefit_overuse": null,
        "affiliation": {
          "description": "DTC",
          "id": 96,
          "video_only": false,
          "is_ccp": false,
          "epic_enabled": false,
          "affiliated_doctors_only": false,
          "disallow_membership_card": true,
          "activation_date": null,
          "deactivated_date": null,
          "dependent_registration_disabled": [
          ],
          "affiliated_providers_only_for_agents": false,
          "verify_eligibility": false,
          "name": "DTC",
          "pharmacy_disabled": false,
          "allow_add_family_members": true,
          "request_appointment_enabled": true,
          "phone_only": false,
          "breakthrough_enabled": false,
          "dtc_insurance_enabled": false,
          "insurance_payer": null,
          "privacy_policy_text":"{privacy_policy_text}",
          "informed_consent_text":"{informed_consent_text}",
          "privacy_policy_question":"I have read MDLIVE Medical Group's Privacy Policy and I acknowledge that I have the ability to print a hard copy of the Privacy Policy for my records.",
          "informed_consent_question":"I certify that I have read and accept the terms of MDLIVE Medical Group's Informed Consent."
        },
        "state": {
          "name": "FLORIDA",
          "id": 10
        },
        "pharmacy": {
          "id": 1,
          "name": "CVS/pharmacy #7900",
          "city": "SUNRISE",
          "address1": "10000 W COMMERCIAL BLVD",
          "address2": "",
          "state": "FL",
          "zipcode": "33351",
          "phone": "9547486377",
          "fax": "9547486435",
          "latitude": 26.1935,
          "longitude": -80.2846,
          "twenty_four_hour_flag": false
        },
        "recent_notes": [
        ],
        "family_members": [
          {
            "id": 3,
            "fullname": "John Doe",
            "email": "johndoe@md.com",
            "gender": "Male",
            "age": 32,
            "birthdate": "1987-09-15",
            "user_status_id": 1,
            "parent_id": null,
            "username": "johndoe",
            "first_name": "John",
            "last_name": "Doe",
            "address1": "1 ST NW 1",
            "address2": null,
            "city": "Sunrise",
            "state_id": 10,
            "zip": "33324",
            "phone": "7866665555",
            "cell": null,
            "emergency_contact_number": null,
            "us_time_zone_id": 1,
            "language_id": null,
            "is_authorized": false,
            "is_active": true,
            "email_confirmed": true,
            "image_url": ""
          }
        ],
        "recent_activity_histories": [
        ],
        "chat_histories": [
        ],
        "upcoming_appointments": [
        ]
      }
    }
    

    Update patient related information.

    HTTP Request

    PATCH {server_url}/api/v2/patients/{patient_id}

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    Request Body

    The following parameters are required to retrieve a patient.

    Attribute Required Description
    patient_id true ID of the patient to be retrieved

    Request Body Parameters

    Attribute Required Description
    patient true parent attribute for the patient
    ↳ first_name false Patient's first name
    ↳ last_name false Patient's last name
    ↳ gender false Patient's gender, specified as 'M' for male, 'F' for female
    ↳ birthdate false Patient's birthdate, specified as year-month-day
    ↳ phone false Patient's contact phone number
    ↳ cell false Patient's mobile phone number
    ↳ emergency_contact_number false Patient's emergency contact phone number
    ↳ email false Patient's email address
    ↳ address1 false First line of Patient's mailing address
    ↳ address2 false Second line of Patient's mailing address, if needed
    ↳ city false City of Patient's mailing address
    ↳ state_id false State ID of Patient's mailing address (See documentation
    ↳ zip false Zip code of Patient's mailing address
    ↳ pharmacy_id false Pharmacy ID of Patient's pharmacy (See documentation

    Payments - Cost

    Returns the appointment cost.

    curl -X GET '{server_url}/api/v2/payments/costs/check?patient_id={patient_id}&provider_type_id={provider_type_id}&promo_code={promo_code}&state_abbrev={state_abbrev}&authorize_insurance={authorize_insurance}' \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v2/payments/costs/check?patient_id={patient_id}&provider_type_id={provider_type_id}&promo_code={promo_code}&state_abbrev={state_abbrev}&authorize_insurance={authorize_insurance}',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "cost_with_no_promocode": 49,
      "final_amount": 49,
      "cost": 49,
      "consultation_charge": 49,
      "payment_breakup": null
    }
    

    HTTP Request

    To retrieve the appointment cost, make a request to:

    GET {server_url}/api/v2/payments/costs/check

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    provider_type_id true Provider Type ID, from the provider types list
    promo_code false Promo code to apply to the cost of the appointment
    state_abbrev false 2-Letter state abbreviated, from the states list
    authorize_insurance false boolean to return cost with insurance (true) or without insurance (false)

    HTTP Response

    Attribute Description
    cost The cost is the attribute holds the final consultation charge for the patient.

    Payments - Get Patient Default Credit Card

    curl -X GET {server_url}/api/v1/patients/{patient_id}/credit_card \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :get,
      :url => '{server_url}/api/v1/patients/{patient_id}/credit_card',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "credit_card": {
        "subscriber_id": 950,
        "subscriber_card_id": 486,
        "billing_data": {
          "address1": "2900 NW 130th Ave #106",
          "address2": "",
          "city": "Sunrise",
          "state": "FL",
          "zip": "33323",
          "name": "John Doe",
          "country": "US"
        },
        "card_data": {
          "last_four": "4242",
          "active": true,
          "type": "VISA",
          "expiration_month": 1,
          "expiration_year": 2020
        }
      }
    }
    

    HTTP Request

    To retrieve the patient's default card, make a request to:

    GET {server_url}/api/v1/patients/{patient_id}/credit_card

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Payments - Create/Update Credit Card

    curl -X POST {server_url}/api/v2/patients/{patient_id}/credit_card \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
        "credit_card": {
          "billing_data": {
            "name": "John Doe",
            "address1": "2900 NW 130th Ave #106",
            "address2": "",
            "state_abbrev": "FL",
            "city": "Sunrise",
            "zip": "33323"
          },
          "card_data": {
            "card_number": "4242424242424242",
            "cvv": "200",
            "expiration_month": 1,
            "expiration_year": 2020
          }
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => '{server_url}/api/v2/patients/{patient_id}/credit_card',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      },
      :payload => {
        :credit_card => {
          :billing_data => {
            :name => "John Doe",
            :address1 => "2900 NW 130th Ave #106",
            :address2" => "",
            :state_abbrev => "FL",
            :city => "Sunrise",
            :zip => "33323"
          },
          :card_data => {
            :card_number => "4242424242424242",
            :cvv => "200",
            :expiration_month => 1,
            :expiration_year => 2020
          }
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "credit_card": {
        "subscriber_id": 950,
        "subscriber_card_id": 486,
        "billing_data": {
          "address1": "2900 NW 130th Ave #106",
          "address2": "",
          "city": "Sunrise",
          "state": "FL",
          "zip": "33323",
          "name": "John Doe",
          "country": "US"
        },
        "card_data": {
          "last_four": "4242",
          "active": true,
          "type": "VISA",
          "expiration_month": 1,
          "expiration_year": 2020
        }
      }
    }
    

    HTTP Request

    To create or update a credit card as the default card for a patient, make a request to:

    POST {server_url}/api/v2/patients/{patient_id}/credit_card

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    The following parameters need to be included in the body of the request:

    Attribute Required Description
    credit_card true Parent attribute for the credit card
    ↳ billing_data true Parent attribute for billing information
        ↳ name true Cardholder's name
        ↳ address1 true Cardholder's address 1
        ↳ address2 false Cardholder's address 2
        ↳ state_abbrev true Cardholder's state abbreviation
        ↳ city true Cardholder's city
        ↳ zip true Cardholder's ZIP Code
    ↳ card_data true Parent attribute for credit card information
        ↳ card_number true The card number, as a string without any separators
        ↳ cvv true Cardholder's name
        ↳ expiration_month true Two digit number representing the card's expiration month
        ↳ expiration_year true Four digit number representing the card's expiration year

    Payments - Delete Credit Card

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/credit_card \
      -H 'Authorization: Bearer {jwt_token}' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    RestClient::Request.new(
      :method => :delete,
      :url => '{server_url}/api/v1/patients/{patient_id}/credit_card',
      :headers => {
        'Authorization' => 'Bearer {jwt_token}',
        'Content-type' => 'application/json',
        'Accept' => 'application/json'
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "success":true
    }
    

    HTTP Request

    To delete the patient's default credit card, make a request to:

    DELETE {server_url}/api/v1/patients/{patient_id}/credit_card

    Headers

    Parameter Default
    Authorization Bearer {jwt_token}
    Accept application/json
    Content-type application/json

    This request must include a valid User JWT token, please see our documentation.

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    curl -X POST {server_url}/api/v1/patients/{patient_id}/pharmacies/search
    -H "Content-type: application/json"
    -H "Authorization: Bearer 34a2sample-user-token"
    -d '{
        "city": "Sunrise",
        "coordinates": {
            "latitude": "26.19",
            "longitude": "-80.12"
        },
        "page": 1,
        "per_page": 10,
        "radius": 10,
        "state": "FL",
        "twenty_four_hour_pharmacy": false,
        "zipcode": "33351"
    }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/pharmacies/search",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
      },
      :payload => {
        city: "Sunrise",
        state: "FL",
        zipcode: "33351",
        page: 1,
        per_page: 10,
        radius: 10,
        twenty_four_hour_pharmacy: false,
        coordinates: { latitude: "26.19", longitude: "-80.12" }
      }
    ).execute
    

    The command above returns JSON structured like this:

    [
      {
        "id": 1,
        "name": "CVS\/pharmacy #7900",
        "address1": "10000 W COMMERCIAL BLVD",
        "address2": "",
        "city": "SUNRISE",
        "state": "FL",
        "zipcode": "33351",
        "phone": "9547486377",
        "fax": "9547486435",
        "latitude": 26.1935,
        "longitude": -80.2846,
        "twenty_four_hour_flag": false
      }
    ]
    

    Searches for pharmacies nearby to the given patient.

    HTTP Request

    POST {server_url}/api/v1/patients/{patient_id}/pharmacies/search

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Request Body

    The following parameters can be used to search for a pharmacy.

    Attribute Required Description
    id true ID of the patient
    city false Name of the city
    state false Two letter abbreviation of the state, see list
    zipcode false ZIP code
    page false Index of the page with the results, defaults to 1
    per_page false Results per page, defaults to 10
    radius false Radius of search, defaults to 30
    name false Name of the pharmacy
    twenty_four_hour_pharmacy false Permitted values are true, false
    coordinates false Hash with latitude and longitude
    latitude true Latitude as string
    longitude true Longitude as string

    Prescriptions - Retrieve a prescription

    curl {server_url}/api/v1/patients/{patient_id}/prescriptions/{prescription_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer 34a2sample-user-token"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/prescriptions/{prescription_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-user-token"
      }
    ).execute
    

    The command above returns JSON structured like this:

    {
      "prescription": {
        "id": 1,
        "patient_name": "Test Isle",
        "patient_id": 3,
        "provider_name": "Travis Stork",
        "provider_id": 4,
        "pharmacy_name": "CVS 17070 IN TARGET",
        "pharmacy_id": 94877,
        "medication_name": "Ibuprofen IB 200 mg tablet",
        "appointment_id": 43,
        "prescribed_at": "2018-06-23T02:33:13+00:00" 
      }
    }
    

    Retrieve the details of a prescription for the patient. You need supply the unique patient and prescription identifiers.

    HTTP Request

    GET {server_url}/api/v1/patients/{patient_id}/prescriptions/{prescription_id}

    This request must include a valid User JWT token, please see our documentation.

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    URL Parameters

    The following parameters need to be included in the URL of the request:

    Attribute Required Description
    patient_id true ID of the patient to be retrieved
    prescription_id true ID of the prescription to be retrieved

    Primary Care Physician - Retrieve a Primary Care Physician

    curl -X GET {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "pcp": {
        "id": 1
        "full_name": "PCP Physician",
        "first_name": "PCP",
        "last_name": "Physician",
        "middle_name": "",
        "practice": "Doc Medical Practice",
        "email": "doctor@example.com",
        "address1": "123 Main St",
        "address2": "",
        "city": "FORT LAUDERDALE",
        "state_abbrev": "FL",
        "country_code": "US",
        "zip": "33301",
        "phone": "(954) 555-1111",
        "cell": "(954) 555-1111",
        "fax": "(954) 552-1234",
      }
    }
    

    When a patient does not have a primary care physician, the above command will return the following JSON:

    { "pcp" : null }
    

    MDLIVE allows patients to add their primary care physician. This endpoint retrives information for a patient's primary care physician.

    HTTP Request

    GET {server}/api/v1/patients/{patient_id}/evr_primary_care_physician

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Primary Care Physician - Create a Primary Care Physician

    curl -X POST {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
      -d '{
           "pcp": {
             "first_name": "PCP",
             "last_name": "Physician",
             "middle_name": "",
             "practice": "Doc Medical Practice",
             "email": "doctor@example.com",
             "address1": "123 Main St",
             "address2": "",
             "city": "FORT LAUDERDALE",
             "state_abbrev": "FL",
             "country_code": "US",
             "zip": "33301",
             "phone": "(954) 555-1111",
             "cell": "(954) 555-1111",
             "fax": "(954) 552-1234"
           }
         }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
      :payload => {
         pcp: {
           first_name: "PCP",
           last_name: "Physician",
           middle_name: "",
           practice: "Doc Medical Practice",
           email: "doctor@example.com",
           address1: "123 Main St",
           address2: "",
           city: "FORT LAUDERDALE",
           state_abbrev: "FL",
           country_code: "US",
           zip: "33301",
           phone: "(954) 555-1111",
           cell: "(954) 555-1111",
           fax: "(954) 552-1234"
         }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "pcp": {
        "id": 3
        "full_name": "PCP Physician",
        "first_name": "PCP",
        "last_name": "Physician",
        "middle_name": "",
        "practice": "Doc Medical Practice",
        "email": "doctor@example.com",
        "address1": "123 Main St",
        "address2": "",
        "city": "FORT LAUDERDALE",
        "state_abbrev": "FL",
        "country_code": "US",
        "zip": "33301",
        "phone": "(954) 555-1111",
        "cell": "(954) 555-1111",
        "fax": "(954) 552-1234",
      }
    }
    

    To create a primary care physician (PCP) for a patient, make a request to:

    HTTP Request

    POST {server}/api/v1/patients/{patient_id}/evr_primary_care_physician

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Parameter Type Required Description
    pcp object true Object containing contact information about the PCP
    ↳  first_name string true PCP first name
    ↳  last_name string true PCP last name
    ↳  middle_name string false PCP middle name
    ↳  practice string true Name of the PCP practice
    ↳  email string false PCP work email
    ↳  address1 string false PCP office address 1
    ↳  address2 string false PCP office address 2
    ↳  city string true PCP office city
    ↳  state_abbrev string true PCP office state abbreviation
    ↳  country_code string true PCP office two letter country code
    ↳  zip string false PCP office zipcode
    ↳  phone string true PCP office number
    ↳  cell string false PCP cell number
    ↳  fax string true PCP office fax number

    Primary Care Physician - Update a Primary Care Physician

    curl -X POST {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id}
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
      -d '{
           "pcp": {
             "first_name": "PCP",
             "last_name": "Physician",
             "middle_name": "",
             "practice": "PCP Practice",
             "email": "doctor@example.com",
             "address1": "555 Move Street",
             "address2": "",
             "city": "FORT LAUDERDALE",
             "state_abbrev": "FL",
             "country_code": "US",
             "zip": "33301",
             "phone": "(954) 555-5555",
             "cell": "(954) 555-5555",
             "fax": "(954) 552-1234"
           }
         }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
      :payload => {
         pcp: {
           first_name: "PCP",
           last_name: "Physician",
           middle_name: "",
           practice: "PCP Practice",
           email: "doctor@example.com",
           address1: "555 Move St",
           address2: "",
           city: "FORT LAUDERDALE",
           state_abbrev: "FL",
           country_code: "US",
           zip: "33301",
           phone: "(954) 555-1111",
           cell: "(954) 555-1111",
           fax: "(954) 552-1234"
         }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "pcp": {
        "id": 2
        "full_name": "PCP Physician",
        "first_name": "PCP",
        "last_name": "Physician",
        "middle_name": "",
        "practice": "PCP Practice",
        "email": "doctor@example.com",
        "address1": "555 Move Street",
        "address2": "",
        "city": "FORT LAUDERDALE",
        "state_abbrev": "FL",
        "country_code": "US",
        "zip": "33301",
        "phone": "(954) 555-5555",
        "cell": "(954) 555-5555",
        "fax": "(954) 552-1234",
      }
    }
    

    A patient can update their primary care physician's (PCP) contact information.

    HTTP Request

    PUT {server}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    id true The ID of the PCP to update

    Request Body Parameters

    Parameter Type Required Description
    pcp object true Object containing information about the PCP
    ↳  first_name string false PCP first name
    ↳  last_name string false PCP last name
    ↳  middle_name string false PCP middle name
    ↳  practice string false Name of the PCP practice
    ↳  email string false PCP work email
    ↳  address1 string false PCP office address 1
    ↳  address2 string false PCP office address 2
    ↳  city string false PCP office city
    ↳  state_abbrev string false PCP office state abbreviation
    ↳  country_code string false PCP office two letter country code
    ↳  zip string false PCP office zipcode
    ↳  phone string false PCP office number
    ↳  cell string false PCP cell number
    ↳  fax string false PCP office fax number

    Primary Care Physician - Delete a Primary Care Physician

    curl -X DELETE {server_url}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id}
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      }
    ).execute
    

    The above command will return a 204 status code with no content in the body.

    This endpoint deletes the primary care physician associated with a patient.

    HTTP Request

    DELETE {server}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient
    id true The ID of the PCP to delete

    Primary Care Physician Questions - Retrieve Questions

    curl -X GET {server_url}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "pcp_questions": [
        {
          "name": "primary_care_physician",
          "question": "Do you have a Primary Care Physician?",
          "value": false
        },
        {
          "name": "pcp_correct_information",
          "question": "Is your Primary Care Physician information correct?",
          "value": true
        },
        {
          "name": "pcp_visit_information",
          "question": "Would you like the visit information to be sent to your PCP?",
          "value": false
        }
      ]
    }
    

    While scheduling an appointment, you can capture information about a patient's primary care physician (PCP). MDLIVE will send information to the patient's PCP if the patient confirms their PCP's contact information and opts to have their information sent.

    To retrieve a list of PCP related questions, make a request to:

    HTTP Request

    GET {server}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Primary Care Physician Questions - Update Responses to PCP Questions

    curl -X PUT {server_url}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
      -d '{
            "pcp_questions": [
              {
                "name": "primary_care_physician",
                "value": true
              }
            ]
         }'
    
    RestClient::Request.new(
      :method => :put,
      :url => "{server_url}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer 34a2sample-api-token",
        "Accept" => "application/json"
      },
      :payload => {
        pcp_questions: {
          name: "primary_care_physician",
          value: true
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "pcp_questions": [
        {
          "name": "primary_care_physician",
            "question": "Do you have a Primary Care Physician?",
            "value": true
        },
        {
          "name": "pcp_correct_information",
          "question": "Is your Primary Care Physician information correct?",
          "value": false
        },
        {
          "name": "pcp_visit_information",
          "question": "Would you like the visit information to be sent to your PCP?",
          "value": false
        }
      ]
    }
    

    To update a patient's responses to primary care physician (PCP) related questions, make a request to:

    HTTP Request

    PUT {server}/api/v2/patients/{patient_id}/evr_primary_care_physician_questions

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Parameter Type Required Description
    pcp_questions array of objects true Parent attribute for array of pcp questions
    ↳ name string true Name for PCP question
    ↳ value boolean true True or False answer to the Primary Care Physician question

    Provider Types

    MDLIVE offers multiple types of appointments, the types of appointments patients are allowed to schedule is defined once your relationship with MDLIVE begins.

    We allow patients to schedule appointments with Pediatricians, Family Physicians, Therapists and Psychiatrists.

    ID Name
    2 Pediatrician
    3 Family Physician
    5 Therapist
    6 Psychiatrist

    States

    MDLIVE is offered to our patients across all states in the USA. However, each state has different regulations regarding how a patient may have an appointment with a provider.

    Currently only two states place a restriction on how a patient may have an appointment with a provider.

    Idaho only allows patients to have an appointment via Video.

    Arkansas allows patients to have video or phone appointments, only after they have completed an appointment via video.

    ID Name Abbreviation
    1 Alabama AL
    2 Alaska AK
    3 Arizona AZ
    4 Arkansas AR
    5 California CA
    6 Colorado CO
    7 Connecticut CT
    8 Delaware DE
    9 District of Columbia DC
    10 Florida FL
    11 Georgia GA
    12 Hawaii HI
    13 Idaho ID
    14 Illinois IL
    15 Indiana IN
    16 Iowa IA
    17 Kansas KS
    18 Kentucky KY
    19 Louisiana LA
    20 Maine ME
    21 Maryland MD
    22 Massachusetts MA
    23 Michigan MI
    24 Minnesota MN
    25 Mississippi MS
    26 Missouri MO
    27 Montana MT
    28 Nebraska NE
    29 Nevada NV
    30 New Hampshire NH
    31 New Jersey NJ
    32 New Mexico NM
    33 New York NY
    34 North Carolina NC
    35 North Dakota ND
    36 Ohio OH
    37 Oklahoma OK
    38 Oregon OR
    39 Pennsylvania PA
    40 Rhode Island RI
    41 South Carolina SC
    42 South Dakota SD
    43 Tennessee TN
    44 Texas TX
    45 Utah UT
    46 Vermont VT
    47 Virginia VA
    48 Washington WA
    49 West Virginia WV
    50 Wisconsin WI
    51 Wyoming WY
    52 American Samoa AM
    53 Federated States of Micronesia FM
    54 Guam GU
    55 Marshall Islands MH
    56 Northern Mariana Islands MP
    57 Palau PW
    58 Puerto Rico PR
    59 Virgin Islands VI
    60 Armed Forces Europe AE

    Surgeries/Procedures - Create

    curl -X POST {server_url}/api/v2/patients/{patient_id}/surgeries
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    -d '{
          "surgery": {
            "name": "Hip Replacement",
            "surgery_year": 2015
          }
        }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v2/patients/{patient_id}/surgeries",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      },
      :payload => {
                    "surgery": {
                      "name": "Hip Replacement",
                      "surgery_year": 2015
                    }
                  }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "surgery": {
        "id": 108,
        "name": "Hip Replacement",
        "surgery_year": 2015
      }
    }
    

    To create a surgery or procedure for a patient, make a request to:

    HTTP Request

    POST {server_url}/api/v2/patients/{patient_id}/surgeries

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when creating a surgery. To search for surgery name, reference Surgeries/Procedures - Names List.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient

    Request Body Parameters

    Attribute Required Description
    surgery true Parent attribute for surgery/procedure
    ↳ name true Description of surgery/procedure from surgery names list
    ↳ surgery_year true Four digit year when the surgery/procedure took place OR blank value when unknown

    Surgeries/Procedures - Delete

    curl -X DELETE {server_url}/api/v1/patients/{patient_id}/surgeries/{surgery_id}
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :delete,
      :url => "{server_url}/api/v1/patients/{patient_id}/surgeries/{surgery_id}",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    To remove a surgery or procedure from a patient's list of surgeries, make a request to:

    HTTP Request

    DELETE {server_url}/api/v1/patients/{patient_id}/surgeries/{surgery_id}

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required when removing surgery/procedure.

    URL Parameter

    Attribute Required Description
    patient_id true MDLIVE ID for patient
    surgery_id true ID of patient's surgery/procedure

    Surgeries/Procedures - Patient's List

    curl -X GET {server_url}/api/v2/patients/{patient_id}/surgeries
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/patients/{patient_id}/surgeries",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "surgeries": [
        {
          "id": 7,
          "name": "Ankle",
          "surgery_year": 1985
        },
        {
          "id": 11,
          "name": "Appendectomy",
          "surgery_year": 1990
        }
      ]
    }
    

    To retrieve the list of a patient's current list of surgeries and procedures, make a request to:

    HTTP Request

    GET {server_url}/api/v2/patients/{patient_id}/surgeries

    This request must include a valid User JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    The following parameters are required to retrieve the list of patient's surgeries and procedures.

    URL Parameter

    Parameter Required Description
    patient_id true MDLIVE ID for patient

    Surgeries/Procedures - Names List

    curl -X GET {server_url}/api/v2/surgery_names
    -H "Content-type: application/json"
    -H "Authorization: Bearer {jwt_token}"
    
    RestClient::Request.new(
      :method => :get,
      :url => "{server_url}/api/v2/surgery_names",
      :headers => {
        "Content-type" => "application/json",
        "Authorization" => "Bearer {jwt_token}"
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "surgery_names": [
        { "name": "Ankle" },
        { "name": "Appendectomy" },
        { "name": "CABG (Bypass surgery)" },
        { "name": "Colon resection" },
        { "name": "Craniotomy" },
        { "name": "Ear Tubes" },
        { "name": "Gall bladder" },
        { "name": "Head or neck" },
        { "name": "Hip replacement" },
        { "name": "Knee" },
        { "name": "Lung resection" },
        { "name": "Pacemaker" },
        { "name": "Plastic Surgery" },
        { "name": "Wrist" }
      ]
    }
    

    To retrieve the full list of names for surgeries of interest on patient history in the MDLIVE system, make a request to:

    HTTP Request

    GET {server_url}/api/v2/surgery_names

    This request must include a valid JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Authorization Bearer {jwt_token}

    Webhooks - Create or Update

    curl -X POST {server_url}/api/v1/webhook
      -H "Content-type: application/json"
      -H "Authorization: Bearer 34a2sample-api-token"
      -H "Accept: application/json"
      -d '{
        "webhook": {
          "url": "https://www.webhook.com"
        }
      }'
    
    RestClient::Request.new(
      :method => :post,
      :url => "{server_url}/api/v1/webhook",
      :headers => {
        "Content-type" => "application/json"
        "Accept" => "application/json"
        "Authorization" => "Bearer 34a2sample-api-token",
      },
      :payload => {
        :webhook => {
          :url => "https://www.webhook.com"
        }
      }
    ).execute
    

    The above command returns JSON structured like this:

    {
      "webhook": {
        "url": "https://www.webhook.com"
      }
    }
    

    Partner applications can create or update their webhook urls.

    HTTP Request

    POST {server_url}/api/v1/webhook

    This request must include a valid Api JWT token, please see our documentation

    Header Parameter

    Parameter Default
    Content-type application/json
    Accept application/json
    Authorization Bearer {jwttoken}

    Request Body

    Attribute Required Description
    webhook true Webhook object
    ↳ url true URL for sending Webhooks (must be a valid secure URL)

    Response Codes

    MDLIVE returns the following response codes from our API endpoints.

    Response codes list

    HTTP Status Code Reason
    200 Successful operation
    201 Successful creation
    204 Successful operation, there is no body to return
    400 Missing required parameter
    401 Not authorized or invalid token data
    404 Patient or resource not found
    409 Request has data conflict with server
    422 Request data unprocessable