GithubHelp home page GithubHelp logo

api_dentalapp's Introduction

api_dentalapp Documentation

API REQUESTS

  1. login_post http://localhost/api_dentalapp/Api/login/KEY posted data
{
  "username": "[email protected]",
  "password": "admin"
}
  1. response
{
  "msg": "USER_FOUND",
  "status": "Authenticated",
  "user": {
    "name": "Super l Administrator",
    "uuid": "2",
    "usertype": "admin"
  }
}
  1. post a new request / consulation
  2. automatically login in the user and give them their deault password login
  3. Patient is a hardcoded user category predefined from the forms http://localhost/api_dentalapp/Api/request/KEY
  4. posted data
{
  "name": "Kiyingi Chris",
  "mobile": "07877261881",
  "email": "[email protected]",
  "clinic": " Kitezi HCIII",
  "doctor": "5",
  "address": "Kampala",
  "request_date": "2020-05-23",
  "requested_date": "2020-05-24",
  "services": "Tooth Removal, Whitening, Cementing",
  "remarks": "In Pain",
  "usertype": "Patient"
}
  1. response
{
  "error": "",
  "msg": "CREATED",
  "message": "Submitted",
  "userinfo": [
    {
      "uuid": "18",
      "username": "07877261881",
      "password": "d56b699830e77ba53855679cb1d252da",
      "apikey": null,
      "usertype": "Patient",
      "name": "Kiyingi Chris",
      "created_on": "2020-05-23 20:55:51",
      "status": "1"
    }
  ]
}

http://localhost/api_dentalapp/Api/requests/KEY

  1. get last 20 requests for Admins
  2. response
{
  "msg": "Data Found",
  "requests": [
    {
      "id": "1",
      "name": "Nkuke Henry",
      "mobile": "0785677181",
      "email": "[email protected]",
      "clinic": "ST. MARYS",
      "doctor": "1",
      "address": "KYEBANDO NSOBA",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-25 03:08:43",
      "services": "Dental cleaning, Cementing",
      "remarks": "Thanks",
      "status": "0"
    },
    {
      "id": "2",
      "name": "Agaba Andrew",
      "mobile": "0702787688",
      "email": "[email protected]",
      "clinic": "St.Marys",
      "doctor": "4",
      "address": "Kampala",
      "request_date": "2020-05-22",
      "requested_date": "2020-05-30 05:35:07",
      "services": "Teeth Whitening",
      "remarks": "Call me to comfirm",
      "status": "0"
    },
    {
      "id": "3",
      "name": "Dembe Denis",
      "mobile": "07829928199",
      "email": null,
      "clinic": " Kitezi HCIII",
      "doctor": "3",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-29 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    },
    {
      "id": "4",
      "name": "Dembe Denis",
      "mobile": "07829928199",
      "email": "[email protected]",
      "clinic": " Kitezi HCIII",
      "doctor": "3",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-29 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    },
    {
      "id": "5",
      "name": "Luck Jim",
      "mobile": "07899928199",
      "email": "[email protected]",
      "clinic": " Kitezi HCIII",
      "doctor": "2",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-24 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    },
    {
      "id": "6",
      "name": "Luck Jim",
      "mobile": "07899928199",
      "email": "[email protected]",
      "clinic": " Kitezi HCIII",
      "doctor": "2",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-24 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    }
  ]
}
  1. search request _post http://localhost/api_dentalapp/Api/searchRequest/KEY
  2. post data allows name,date,request_id strings
{
  "searchTerm": "JIM"
}
  1. response
{
  "msg": "Data Found",
  "requests": [
    {
      "id": "5",
      "name": "Luck Jim",
      "mobile": "07899928199",
      "email": "[email protected]",
      "clinic": " Kitezi HCIII",
      "doctor": "2",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-24 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    },
    {
      "id": "6",
      "name": "Luck Jim",
      "mobile": "07899928199",
      "email": "[email protected]",
      "clinic": " Kitezi HCIII",
      "doctor": "2",
      "address": "Kampala",
      "request_date": "2020-05-23",
      "requested_date": "2020-05-24 00:00:00",
      "services": "Tooth Removal, Whitening, Cementing",
      "remarks": "Call Me",
      "status": "0"
    }
  ]
}
  1. post request to create reply to a chat between doctors and patients
  2. NB: Message subjects are created when a request is posted
  3. added the number since it a unique username for each user
  4. Any ideas of how can make it realtime http://localhost/api_dentalapp/Api/replymessages/KEY
{
  "request_id": "4",
  "message_id": "6",
  "message_body": "All is okay",
  "name": "Dembe Denis",
  "mobile": "0702783738",
  "usertype": "Patient"
}
  1. get all _messages and all replies http://localhost/api_dentalapp/Api/messages/KEY
  2. response
{
  "msg": "Data Found",
  "messages": [
    {
      "message": {
        "id": "1",
        "followupdate": "2020-05-23 13:35:45",
        "request_id": "1",
        "body": "Tooth alignment, tooth whitening",
        "message_id": null,
        "name": "Agaba Andrew , 0702787688",
        "role": "Patient"
      },
      "reply": [
        {
          "id": "2",
          "followupdate": "2020-05-23 12:33:44",
          "request_id": "1",
          "body": "Thanks for get in touch with, we shall give you a call shortly to comfirm",
          "message_id": "1",
          "name": "Gordon Asiimwe",
          "role": "Doctor"
        },
        {
          "id": "5",
          "followupdate": "2020-05-23 13:36:26",
          "request_id": "1",
          "body": "Hope the service was satisfactory",
          "message_id": "1",
          "name": "Dr. Godwin",
          "role": "Doctor"
        }
      ]
    },
    {
      "message": {
        "id": "3",
        "followupdate": "2020-05-23 13:35:53",
        "request_id": "4",
        "body": "Need Help with Enamel Coating",
        "message_id": null,
        "name": "Dembe Denis",
        "role": "Patient"
      },
      "reply": [
        {
          "id": "4",
          "followupdate": "2020-05-23 13:36:20",
          "request_id": "4",
          "body": "Thanks Denis, we will call you shortly",
          "message_id": "3",
          "name": "Dr. Godwin",
          "role": "Admin"
        },
        {
          "id": "6",
          "followupdate": "2020-05-23 14:15:00",
          "request_id": "4",
          "body": "Dembe, how Enamel Coating holding",
          "message_id": "3",
          "name": "Dr. Birungi Deus",
          "role": "Doctor"
        }
      ]
    }
  ]
}
  1. get clinic services http://localhost/api_dentalapp/Api/services/KEY
  2. response
{
  "msg": "Data Found",
  "requests": [
    {
      "id": "1",
      "name": "Dental Implants",
      "img_url": "",
      "description": null
    },
    {
      "id": "2",
      "name": "Teeth Whitening",
      "img_url": "",
      "description": null
    },
    {
      "id": "3",
      "name": "Cosmic Braces",
      "img_url": "",
      "description": null
    }
  ]
}

get users messages and replies http://localhost/api_dentalapp/Api/message/KEY

  1. postdata
{
  "username": "0702787688"
}
{
  "msg": "Data Found",
  "messages": [
    {
      "message": {
        "id": "1",
        "followupdate": "2020-05-23 16:17:38",
        "request_id": "1",
        "body": "Tooth alignment, tooth whitening",
        "message_id": null,
        "name": "Agaba Andrew",
        "mobile": "0702787688",
        "role": "Patient"
      },
      "reply": [
        {
          "id": "2",
          "followupdate": "2020-05-23 12:33:44",
          "request_id": "1",
          "body": "Thanks for get in touch with, we shall give you a call shortly to comfirm",
          "message_id": "1",
          "name": "Gordon Asiimwe",
          "mobile": "",
          "role": "Doctor"
        },
        {
          "id": "5",
          "followupdate": "2020-05-23 13:36:26",
          "request_id": "1",
          "body": "Hope the service was satisfactory",
          "message_id": "1",
          "name": "Dr. Godwin",
          "mobile": "",
          "role": "Doctor"
        }
      ]
    }
  ]
}
  1. create new doctor _post
  2. creates a user account for the doctor with details login http://localhost/api_dentalapp/Api/newdoctor/KEY
{
  "work_id": "07726",
  "name": "Bruno James",
  "email": "[email protected]",
  "mobile": "0787838768",
  "cadre": "Dental Assistant",
  "usertype":"Doctor"
}
1. response
{
  "error": "",
  "msg": "CREATED",
  "message": "Submitted",
  "logins": [
    {
      "uuid": "10",
      "username": "07277838328",
      "password": "d56b699830e77ba53855679cb1d252da",
      "apikey": null,
      "usertype": "Doctor",
      "name": "Prince James",
      "created_on": "2020-05-23 16:59:16",
      "status": "1"
    }
  ]
}
  1. available doctors_post to get available for requests by schedule date http://localhost/api_dentalapp/Api/availableDoctors/KEY
  2. postdata
{
  "searchDate": "2020-05-25"
}
1. response
{
  "msg": "Data Found",
  "requests": [
    {
      "id": "1",
      "name": "Sam Agaba",
      "cadre": "Dental Surgeon"
    },
    {
      "id": "2",
      "name": "Nkuke Henry",
      "cadre": "Dental Surgeon"
    }
  ]
}
  1. get_doctors list http://localhost/api_dentalapp/Api/doctors/KEY
{
  "msg": "Data Found",
  "requests": [
    {
      "id": "1",
      "work_id": "CM871819191",
      "name": "Sam Agaba",
      "email": "[email protected]",
      "contacts": "0778787889",
      "cadre": "Dental Surgeon",
      "flag": "1"
    },
    {
      "id": "2",
      "work_id": "CM8718191916",
      "name": "Nkuke Henry",
      "email": "",
      "contacts": "077878789",
      "cadre": "Dental Surgeon",
      "flag": "1"
    },
    {
      "id": "3",
      "work_id": "e89929829",
      "name": "Dembe Denis",
      "email": "",
      "contacts": "078378299281",
      "cadre": "Dental Surgeon",
      "flag": "1"
    },
    {
      "id": "4",
      "work_id": "77277718",
      "name": "Jimmy Carter",
      "email": "",
      "contacts": "",
      "cadre": "Dental Surgeon",
      "flag": "1"
    },
    {
      "id": "5",
      "work_id": "213123YY37817",
      "name": "Asiimwe Gordon",
      "email": "",
      "contacts": "0781781788188",
      "cadre": "Dental Surgeon",
      "flag": "1"
    }
  ]
}
  1. change password /reset password http://localhost/api_dentalapp/Api/changePassword/KEY
{
  "username": "admin",
  "oldpwd": "admin",
  "newpwd": "admin"
}
1. response

{
  "msg": "Success",
  "messages": "Changed Successful"
}
  1. cancelRequest_post http://localhost/api_dentalapp/Api/cancelRequest/KEY
  2. postdata
{
  "requestId":"26"
}
1. response
{
  "msg": "Cancelled",
  "requests": {
    "dbstatus": "Cancelled"
  }
}

api_dentalapp's People

Contributors

agabaandre avatar

Watchers

James Cloos avatar  avatar Nkuke Henry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.