Skip to content

Latest commit

 

History

History
207 lines (185 loc) · 7.71 KB

UC22.md

File metadata and controls

207 lines (185 loc) · 7.71 KB

API Document for UC22

Summary Table

Function Endpoint Method Request Payload Sucess Response Error Response
Get Office Visits for patient {{base_url}}/officevisits/myofficevisits GET 200 OK - Office visit list for patient 401 Unauthorized - User not authenticated
404 Not Found - id Not Found
Get Surgery Visit detail for patient {{base_url}}/surgeryvisit/{id} GET id (-) 200 OK - Surgery visit detail for patient 401 Unauthorized - User not authenticated
404 Not Found - id Not Found
Document Office Visit {{base_url}}/officevisits POST specified below 200 OK- Success Message 400 Bad Request - Missing or incorrect information
401 Unauthorized - User not authenticated
Edit Office Visit {{base_url}}/officevisits/{id} PUT specified below 200 OK- Success Message 401 Unauthorized - User not authenticated
404 Not Found - id Not Found

API Document Details

Authentication

Before making any requests, users (HCP / OPH / OD) need to authenticate through the iTrust2 system

1. Patient View Surgery Visit(S1)

1.1 Get Office Visits for patient

  • Endpoint: /api/v1/officevisits/myofficevisits

  • Method: GET

  • Success Response:

    • Status: 200 OK
    • Content:
      {
        "patient": "patient1",
        "hcp": "od1",
        "date": "2023-11-22T12:43:00+09:00",
        "type": "GENERAL_CHECKUP",
        "hospital": "Severance",
        "notes": "Some notes about the visit",
        "height": 180.0,
        "weight": 75.0,
        "headCircumference": 30.0,
        "systolic": 120,
        "diastolic": 80,
        "hdl": 50,
        "ldl": 100,
        "tri": 150,
        "houseSmokingStatus": "NONSMOKING",
        "patientSmokingStatus": "NEVER",
        "diagnoses": [],
        "prescriptions": [],
        "eyecheckup": {
          "patient": "patient1",
          "hcp": "od1",
          "visualAcuityOS": 100,
          "visualAcuityOD": 100,
          "sphereOS": -1.5,
          "sphereOD": -1.25,
          "cylinderOS": 0.5,
          "cylinderOD": 0.75,
          "axisOS": 90,
          "axisOD": 85,
          "note": "Additional notes about eyecheckup"
        }
      }
  • Error Response :

    • Status : 401 Unauthorized
    • Status : 404 Not Found

1.2 Get Surgery Visit detail for patient

  • Endpoint: /api/v1/surgeryvisit/{id}

  • Method: GET

  • Success Response:

    • Status: 200 OK
    • Content:
      {
        "id": 34,
        "date": "2023-12-01T15:34:00+09:00",
        "hospital": "Severance",
        "surgeryType": "laser surgery",
        "notes": "Some notes about the visit",
        "eyecheckup": {
          "patient": "patient1",
          "hcp": "od1",
          "visualAcuityOS": 100,
          "visualAcuityOD": 100,
          "sphereOS": -1.5,
          "sphereOD": -1.25,
          "cylinderOS": 0.5,
          "cylinderOD": 0.75,
          "axisOS": 90,
          "axisOD": 85,
          "note": "Additional notes about eyecheckup"
        }
      }
  • Error Response :

    • Status : 401 Unauthorized
    • Status : 404 Not Found

2. Document Office Visit (S2)

  • ophthalmologist or optometrist HCP will enter the following eye health information

  • End point : api/v1/officevisits

  • Method : POST

  • Request Payload :

    • Parameters:

      • patient (String) : patient user name
      • hcp (String) : hcp user name
      • date (String) : Date at which the OfficeVisit occurred
      • type (String) : Type of the OfficeVisit.
      • hospital (String) : Hospital where the OfficeVisit occurred
      • notes (String) : Doctor's Notes on the OfficeVisit
      • height (Float) : Height or length of the person. Up to a 3-digit number and potentially one digit of decimal precision. > 0
      • weight (Float) : Weight of the person. Up to a 3-digit number and potentially one digit of decimal precision. > 0
      • headCircumference (Float) : Head circumference
      • systolic (Integer) : Systolic blood pressure. 3-digit positive number
      • diastolic (Integer) : Diastolic blood pressure. 3-digit positive number.
      • hdl (Integer) : HDL cholesterol. Between 0 and 90 inclusive.
      • ldl (Integer) : LDL cholesterol. Between 0 and 600 inclusive.
      • tri (Integer) : Triglycerides cholesterol. Between 100 and 600 inclusive.
      • houseSmokingStatus (HouseholdSmokingStatus) : Smoking status of the patient's household.
      • patientSmokingStatus (PatientSmokingStatus) : Smoking status of the patient.
      • diagnoses (List) : Diagnosis List
      • eyecheckup (EyecheckupForm) : Eyecheckup Information
    • example payload

    {
      "patient": "patient1",
      "hcp": "od1",
      "date": "2023-11-22T12:43:00+09:00",
      "type": "GENERAL_CHECKUP",
      "hospital": "Severance",
      "notes": "Some notes about the visit",
      "height": 180.0,
      "weight": 75.0,
      "headCircumference": 30.0,
      "systolic": 120,
      "diastolic": 80,
      "hdl": 50,
      "ldl": 100,
      "tri": 150,
      "houseSmokingStatus": "NONSMOKING",
      "patientSmokingStatus": "NEVER",
      "diagnoses": [],
      "prescriptions": [],
      "eyecheckup": {
        "patient": "patient1",
        "hcp": "od1",
        "visualAcuityOS": 100,
        "visualAcuityOD": 100,
        "sphereOS": -1.5,
        "sphereOD": -1.25,
        "cylinderOS": 0.5,
        "cylinderOD": 0.75,
        "axisOS": 90,
        "axisOD": 85,
        "note": "Additional notes about eyecheckup"
      }
    }
    • Success Response :

      • Status : 200 OK
    • Error Response :

      • Status : 400 Bad Request
      • Status : 401 Unauthorized

3. View and Edit Office Visit (S4)

  • End point : api/v1/officevisits/{id}
  • Method : PUT
  • Request Payload :
    • Parameters:

      • patient (String) : patient user name
      • hcp (String) : hcp user name
      • date (String) : Date at which the OfficeVisit occurred
      • type (String) : Type of the OfficeVisit.
      • hospital (String) : Hospital where the OfficeVisit occurred
      • notes (String) : Doctor's Notes on the OfficeVisit
      • height (Float) : Height or length of the person. Up to a 3-digit number and potentially one digit of decimal precision. > 0
      • weight (Float) : Weight of the person. Up to a 3-digit number and potentially one digit of decimal precision. > 0
      • headCircumference (Float) : Head circumference
      • systolic (Integer) : Systolic blood pressure. 3-digit positive number
      • diastolic (Integer) : Diastolic blood pressure. 3-digit positive number.
      • hdl (Integer) : HDL cholesterol. Between 0 and 90 inclusive.
      • ldl (Integer) : LDL cholesterol. Between 0 and 600 inclusive.
      • tri (Integer) : Triglycerides cholesterol. Between 100 and 600 inclusive.
      • houseSmokingStatus (HouseholdSmokingStatus) : Smoking status of the patient's household.
      • patientSmokingStatus (PatientSmokingStatus) : Smoking status of the patient.
      • diagnoses (List) : Diagnosis List
      • eyecheckup (EyecheckupForm) : Eyecheckup Information
    • Success Response :

      • Status : 200 OK
    • Error Response :

      • Status : 401 Unauthorized
      • Status : 404 Not Found