Med Interface

CC2 Enhancements

New API's

Proposed Optimization

OUTLINE

What is it?

What is it?

Value added

EMR Integration

What we're proud of

And Medication ORM/RDE's!

  • FE Code
    • almost 100% covered by unit tests
    • robust TypeScript interfaces ubiquitously
    • uses Async/Await promise syntax for all asynchronous code (in lieu of promise then/catch syntax)
  • Rhapsody integration
  • Restful Endpoint structure

Other technical accomplishments

What we're proud of

  • Patients who take all of their Medications are 50% less likely to be re-admitted
  • Should facilitate larger adoption of the medication reminders feature.
  • EMR integration makes it much easier for medications to get into CC2
  • Clinician control and acknowledgement before activation
  • Major value added!
    • Clients have been asking but due to legacy structure, it was not feasible until now

Benefits to the customer

What we're proud of

Complexity

Name Path What
Medications v1/medications Environment list of medications
Prescribed
Medications
v1/prescribed-medications Patient-specific list of medications with reconciliation status (relational to a user resource and medication resource)
User Tasks v1/tasks Reminders, schedule, active status (relational to a prescribed-medication resource)

MEET The Endpoints

From /moduleinfo  to a more restful structure

Anatomy of a CC2
Medication Reminder

9 Types of User Actions

POST medications
POST prescribed-medications
POST tasks

DELETE prescribed-medications

PATCH prescribed-medications
PATCH tasks

PATCH prescribed-medications
DELETE prescribed-medications
PATCH tasks

PATCH prescribed-medications

9 Types of User Actions (Cont'D)

PATCH prescribed-medications
PATCH tasks

POST medications
PATCH prescribed-medications

PATCH prescribed-medications
POST tasks
PATCH tasks

PATCH prescribed-medications
DELETE prescribed-medications
PATCH tasks

?

How many points to get the save button to work?

BULK SAVE PROCESS Overview

Previous SAVE PROCESS Overview

(POST to moduleinfo)

Complexity in bulk save process

Rhapsody COmplexities

Optimizations

Potential solutions to complexity

Potential optimizations

OFFLOAD TO BE

Move complexity to the BE
Batching API Requests

OPTIMIZE FE LOGIC

Rewrite Save logic to group requests more efficiently and track state based on the original

SIMPLIFY UI

Remove the bulk save process for a save that occurs immediately after each action.

Take as Directed

Create a TAD frequency option!

Questions

Discussion & Questions

Some general notes:

Benefits of what we did to the user, how we're proud of it.
Quicker to the complexity,

potential ways of doing it differently (FE solutions, UI solutions, Gateway solutions, etc)

Leave time for conversation (20-30 minutes),

(this will be a potential issue with surveys, risk, educations)

 

Medications API

v1/medications

Environment-specific list of medications

GET (list, show), POST

 

<< Example shown is the GET response

{
  data: [
      {
        "id": 1,
        "resourceType": "medications",
        "createdAt": "2020-02-03T20:01:26Z[Etc/UTC]",
        "updatedAt": "2022-03-04T18:03:59Z[Etc/UTC]",
        "attributes": {
          "name": "TYLENOL",
          "dose": "100 mg x1 Oral",
          "codingSystem": "",
          "codingSystemId": ""
        }
      },
      {
        "id": 2,
        "resourceType": "medications",
        "createdAt": "2020-02-03T20:01:26Z[Etc/UTC]",
        "updatedAt": "2022-03-04T18:03:59Z[Etc/UTC]",
        "attributes": {
          "name": "METFORMIN",
          "dose": "200 mg x2 Oral",
          "codingSystem": "",
          "codingSystemId": ""
        }
      },
  ]
}

Prescribed Medication API

v1/prescribed-medications

Patient-specific medications

GET, POST, PATCH, DELETE

Filter: hrsid, reconciledBy, reconciledAt,

Include: tasks

<< Example shown is the GET response

{
  data: [
    {
      "id": 1101,
      "resourceType": "prescribed-medications",
      "createdAt": "2021-01-02T15:55:11+00:00",
      "updatedAt": "2021-01-02T15:55:11+00:00",
      "attributes": {
        "orderId": "1101",
        "reconciledBy": "sampleClinHrsid",
        "reconciledAt": "2021-02-06T15:55:11+00:00"
      },
      "relationships": {
        "users": {
          "data": {
            "resourceType": "users",
            "id": "sampleHrsid"
          }
        },
        "medications": {
          "data": {
            "resourceType": "medications",
            "id": 1
          }
        },
        "tasks": {
          "data": [
            {
              "resourceType": "tasks",
              "id": 2101
            },
            {
              "resourceType": "tasks",
              "id": 2102
            }
          ]
        }
      }
    },
  ]
}

tasks API

v1/tasks

Reminders, Schedule and details of a medication

POST, PATCH, DELETE

 

<< Example shown is the POST to v1/tasks payload

{
  "data": [
    {
      "resourceType": "tasks",
      "attributes": {
        "type": "medication",
        "essential": "true",
        "instruction": "Take with food",
        "action": {
          "medicationId": 7,
          "status": "inactive",
          "name": "SYNTHROID",
          "dosage": "10 ml x1 Oral",
          "strength": 10,
          "units": "ml",
          "count": 1,
          "route": "Oral"
        },
        "schedule": {
          "start": "2022-03-11T05:00:00Z",
          "end": "2025-03-31T04:00:00.000Z",
          "at": "09:00:00",
          "window": 60,
          "reminder": "10:00:00",
          "every": {
            "measure": "nthDay",
            "units": [
              "1"
            ]
          }
        }
      },
      "relationships": {
        "prescribedMedications": {
          "data": {
            "id": 1701,
            "resourceType": "prescribed-medications"
          }
        }
      }
    },
    {
      "resourceType": "tasks",
      "attributes": {
        "type": "medication",
        "essential": "true",
        "instruction": "Take with food",
        "action": {
          "medicationId": 8,
          "status": "inactive",
          "name": "LISINOPRIL",
          "dosage": "15 mg x1 Oral",
          "strength": 15,
          "units": "mg",
          "count": 1,
          "route": "Oral"
        },
        "schedule": {
          "start": "2022-03-11T05:00:00Z",
          "end": "2025-03-31T04:00:00.000Z",
          "at": "21:00:00",
          "window": 60,
          "reminder": "22:00:00",
          "every": {
            "measure": "nthDay",
            "units": [
              "2"
            ]
          }
        }
      },
      "relationships": {
        "prescribedMedications": {
          "data": {
            "id": 1801,
            "resourceType": "prescribed-medications"
          }
        }
      }
    }
  ]
}

Safeguarding against complexity

Simplify to solve

Move Medications to its own tab/component

Moving medications to its own tab and component, simplifies the UI. Allows, med int. code to be moved to its own component (benefits upgrade to CC3). Dialogue box can notify the user of the new location.

Remove Save button, add confirmation modals after each action. Modal triggers save.

Each action is its own save. Now the save process is simplified for each action.
 

Example regression test that can be deleted:
Add a medication. Edit that same medication and increase the times. Edit it again and decrease the times. Click save. Make sure the http requests for decreasing times is taken. 

 

Many test cases like the above can be deleted b/c complex actions can no longer happen before a Save.

Saving after each action

Benefits to simplification

Made with Slides.com