FHIR Chat · Description · clinic-arrivals

Stream: clinic-arrivals

Topic: Description


view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:14):

ok welcome @all. Here's a starting proposal:

The application is appointment based. if a mobile phone is registed for the patient:

2 hours before appointment, it sends and SMS to the person saying something like
"Due to the COVID-19 pandemic, the clinic no longer has an open patient waiting room.
When you arrive at the clinic, stay in your car and respond to this SMS with the word
"arrived". The wait in your car until you are invited in. If you do not arrive by car,
then wait [instructions]"

  • note: for non care arrivals (taxis etc, the clinic needs to figure out least worst
    instructions whether it's the waiting room, or

Clinic has a sign on the door something like:

"Due to the COVID-19 Pandemic, this clinic has closed it's waiting room. Please wait
in your car, and SMS "arrived" to

If the patient replies with anything other than "arrived", then....?

Whern the patient replies with "arrived" then
If:

  • the incoming mobile number does not match to a known patient: reply with "This is not a recognised phone number. Please respond with details about the patient who the appointment is for (name, dob, medicare number) ?
    • if the patient is found, remember the link?
    • if the patient is still not found, now what?
  • the mobile number matches a patient without an appointment: ?
  • the mobile number matches an appointment: ?

Once the clinic manager assigns a room and invites the patient (may need to do this
a little earlier since patient will need to walk further), system sends email with
text like:

"The doctor is ready for you now. Please come in to room ##"

Note: Many patients are brought in by someone else, and so the phone may be
associated with a carer not the patient (e.g. perent, partner or son/daughter).

Todo: how much support does the PMS have for tracking associated mobile phone numbers?

  • include a database for the app so it can remember links made ?

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:15):

I guess I should move this into a md file in the repo...

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:23):

https://github.com/grahamegrieve/ClinicArrivals/blob/master/documentation.md

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:28):

Adding @Andy Bond

view this post on Zulip Vadim Peretokin (Mar 18 2020 at 20:31):

Hey all

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:31):

hi

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:33):

@Andy Bond Brett and I didn't discuss Genie at all. But there'd be no reason why Genie couldn't choose to donate their own implementation of the PMS interface...

view this post on Zulip Vadim Peretokin (Mar 18 2020 at 20:33):

Read through the desc. I imagine this is better suited to be a web-based service then that hooks into some SMS API, right

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:34):

sms is the starting point because it ducks all sorts of authentication issues.

view this post on Zulip Vadim Peretokin (Mar 18 2020 at 20:35):

But then we need communication between what's installed on the desktop (Brett's expertise as I understand). I haven't worked with SMS APIs before, happy to dig into this unless there's a recommendation already

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:35):

I have. We're going to start with Twilio - it's easy

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:36):

simple json based web calls

view this post on Zulip Vadim Peretokin (Mar 18 2020 at 20:36):

okay. Got an idea for me to work on?

view this post on Zulip Grahame Grieve (Mar 18 2020 at 20:37):

waiting to hear from @Brian Postlethwaite

view this post on Zulip Vadim Peretokin (Mar 18 2020 at 20:38):

I'll check back in tomorrow morning

view this post on Zulip Brian Postlethwaite (Mar 18 2020 at 20:50):

And I'm waiting to hear from @Brett Esler , the above notes are looking good Grahame, nothing too shocking/difficult.

view this post on Zulip Grahame Grieve (Mar 18 2020 at 21:01):

@Reuben Daniels added

view this post on Zulip Andy Bond (Mar 18 2020 at 21:12):

I dropped a message to James and Michael.

view this post on Zulip Brian Postlethwaite (Mar 18 2020 at 22:42):

Have had a chat with Brett, will get a skeleton together tonight tomorrow.
(already started)

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:01):

eems all we really need is the appointments list for the day then do SMS triggers based on changes to status

@Brett Esler well, doesn't it change through the day? We want more recent information than that?

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:01):

based on feedback from the clinical today... the mobile number is avalable, but there's a consent issue

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:02):

they consent to using the mobile number for follow ups. @Brett Esler can you get that flag?

view this post on Zulip Brett Esler (Mar 19 2020 at 05:12):

there is a "Contact via" in BP which is a preference not a consent; there is a 'do not SMS' in MD which I can provide

view this post on Zulip Brett Esler (Mar 19 2020 at 05:16):

There is consent under the BPComms system; but that is subscriber based system; need to create an account

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:19):

well, we'll just use the number for now without worrying about that, i think

view this post on Zulip Brett Esler (Mar 19 2020 at 05:20):

that makes sense... we can honour the MD 'do not SMS' flag I guess... which is part of the patient details...

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:20):

yes if they have that they don't have an SMS for me

view this post on Zulip Brett Esler (Mar 19 2020 at 05:21):

for the triggers - we would poll; 30-60 seconds and just look for booked->arrived transition to trigger the come inside message

view this post on Zulip Brett Esler (Mar 19 2020 at 05:22):

we could send out an info SMS before the appointment to explain what is going on; start of the day + new bookings

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:24):

hang on = "arrived" = they are waiting in the car park, right?

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:24):

that doesn't trigger the come inside message

view this post on Zulip Brett Esler (Mar 19 2020 at 05:25):

problem is we don't have a come inside trigger in the workflow

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:25):

right. that came up in the clinic today

view this post on Zulip Brett Esler (Mar 19 2020 at 05:25):

we could do arrived if they respond to the SMS outside

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:25):

you mean "there isn't a step in the PMS for 'go to room X'" ?

view this post on Zulip Brett Esler (Mar 19 2020 at 05:26):

there are no room allocations; unless we want to add a label in the app to link the practitioner and a room

view this post on Zulip Brett Esler (Mar 19 2020 at 05:26):

rooms aren't a resource

view this post on Zulip Brett Esler (Mar 19 2020 at 05:26):

in appointments system

view this post on Zulip Brett Esler (Mar 19 2020 at 05:27):

there is a 'seeing doctor' state

view this post on Zulip Brett Esler (Mar 19 2020 at 05:28):

can walkthough on a call if that helps...

view this post on Zulip Brett Esler (Mar 19 2020 at 05:34):

basically was proposin

  • get all booked appointments at start of day and SMS patients about entry arrangements
  • new bookings for today SMS patient immediately about entry arrangements
  • when practice is ready for patient set appointment to 'arrived' status
  • transition to arrived status triggers SMS to patient to come inside (optional room details if we can figure a way to include them)
  • patient comes in and does the visit
  • appointment transitions to 'fulfilled' and no longer relevant

view this post on Zulip Brett Esler (Mar 19 2020 at 05:36):

transistion triggers done by slow poll 30-60s - we are talking <250 appointments generally... my search on appointments is a bit crippled...

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:36):

"when practice is ready for patient" - what is that? when they're in the car park?

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:36):

30-60x ok

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:37):

doesn't the clinic want confirmation that the patient is outside in the PMS?

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:37):

can't leverage "arrived" for the please come to room X message because room X is not tracked, right?

view this post on Zulip Brett Esler (Mar 19 2020 at 05:37):

they could do.. that would have to be an SMS exchange

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:37):

right that's what we want

view this post on Zulip Brett Esler (Mar 19 2020 at 05:38):

so sequence changes there:

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:38):

Clinic doesn't want doctor in the corridor if we can avoid id

view this post on Zulip Brett Esler (Mar 19 2020 at 05:39):

  • when patient arrives to wait outside; they respond to SMS
  • when SMS response is received by app we move to 'arrived' status via API

view this post on Zulip Brett Esler (Mar 19 2020 at 05:40):

to call patient in we could either require a button press in app - i.e. message the patient to come in

view this post on Zulip Brett Esler (Mar 19 2020 at 05:40):

or we could mark the patient as 'seeing doctor' in the PMS which triggers the SMS message for patient to come in

view this post on Zulip Brett Esler (Mar 19 2020 at 05:42):

we could do a manual note to include for each practitioner in the SMS; which could state the room they are in today - manual in the app

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:45):

yes that would be the least work - moving them to 'seeing doctor' sends an SMS that has current room for doctor from running screen

view this post on Zulip Brett Esler (Mar 19 2020 at 05:46):

yep - and means multiple frontdesk seats works fine

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:46):

so running screen has:

  • list of doctors and rooms
  • list of patients in the carpark
  • list of SMSs received that were not understood with a resolve button

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:46):

has to be client/server now, right? :-(

view this post on Zulip Brett Esler (Mar 19 2020 at 05:47):

nope - can do all this on a single desktop; copy deploy no admin

view this post on Zulip Grahame Grieve (Mar 19 2020 at 05:48):

so the UI on;y runs on one desktop? Still needs a database?

view this post on Zulip Brett Esler (Mar 19 2020 at 05:52):

need a shared db if we want multiple desktops to handle sharing doctor/room link; really want a single inbound SMS worker for the arrival to carpark; we could just stash doctor id - room label in cloud storage nothing sensitive there all my doctor id's are globally unique

view this post on Zulip Brett Esler (Mar 19 2020 at 05:55):

plan was to be completely hands off except for unkown response on SMS issues

view this post on Zulip Brett Esler (Mar 19 2020 at 05:55):

just use PMS to control the triggers

view this post on Zulip Grahame Grieve (Mar 19 2020 at 08:15):

need a db to survive a crash. We don't need multiple desktops rigth?

view this post on Zulip Grahame Grieve (Mar 19 2020 at 08:16):

so it's just continuity on the one desktop

view this post on Zulip Brett Esler (Mar 19 2020 at 08:25):

one desktop app is easiest; and this will be mostly handsoff; save practitioner to room link to a data file would do it; just reload on restart...

view this post on Zulip Brett Esler (Mar 19 2020 at 08:26):

we can do file copy; no admin install by download or clickonce launch pretty successfully..

view this post on Zulip Grahame Grieve (Mar 19 2020 at 09:48):

@Brian Postlethwaite any progress - got a framework you can commit? I want to work on the configuration piece

view this post on Zulip Brian Postlethwaite (Mar 19 2020 at 14:01):

Will be committing stuff soon

view this post on Zulip Brian Postlethwaite (Mar 19 2020 at 14:35):

I created some todo's around the SMS messaging area.
Most specifically in the ReceiveMessages space

view this post on Zulip Brian Postlethwaite (Mar 19 2020 at 14:36):

It's currently just grabbing from Brett's public server while we test and get things running.

view this post on Zulip Brian Postlethwaite (Mar 19 2020 at 14:37):

Settings are in the config file
https://github.com/grahamegrieve/ClinicArrivals/blob/master/ClinicArrivals/App.config

view this post on Zulip Brian Postlethwaite (Mar 19 2020 at 14:38):

Could put in a page to edit this content.
(and save it back into the file)

view this post on Zulip Vadim Peretokin (Mar 19 2020 at 15:58):

Let me know what I can help with tonight.

view this post on Zulip Shovan Roy (Mar 19 2020 at 20:28):

(deleted)

view this post on Zulip Grahame Grieve (Mar 20 2020 at 01:31):

@Brett Esler can you get patient language on the API?

view this post on Zulip Grahame Grieve (Mar 20 2020 at 01:46):

ok, I've updated the documentation after discussion with Nathan and Mukesh.

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 01:52):

I'll take a look

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 01:53):

If someone wants to grab something, the reading incoming messages from sms needs doing

view this post on Zulip Grahame Grieve (Mar 20 2020 at 01:56):

can you read the updated docuemtnation?

view this post on Zulip Grahame Grieve (Mar 20 2020 at 01:56):

and can we define an interface for the storage layer?

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:31):

I've pushed a commit with the Interface for the TestSmsMessaging handler

view this post on Zulip Brett Esler (Mar 20 2020 at 02:32):

cool! - I am still getting myself together re startup credentials; chatted with Grahame and think we should use the in-consult change to trigger the come inside SMS rather than from the app - Grahame documented...

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:34):

Is there a hook you can put in to direct fire back to this code rather than polling?

view this post on Zulip Grahame Grieve (Mar 20 2020 at 02:35):

no we poll.

view this post on Zulip Grahame Grieve (Mar 20 2020 at 02:35):

every 10 seconds or so

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:36):

Added a config setting for that interval

view this post on Zulip Brett Esler (Mar 20 2020 at 02:36):

can wrap to make it like an event if you like... define a delegate for an event

view this post on Zulip Grahame Grieve (Mar 20 2020 at 02:36):

make what an event?

view this post on Zulip Brett Esler (Mar 20 2020 at 02:37):

detecting the change in status for one appointment; based on the poll data anyway...

view this post on Zulip Brett Esler (Mar 20 2020 at 02:38):

same stuff really...

view this post on Zulip Brett Esler (Mar 20 2020 at 02:40):

I have public event CalendarEvent OnCalendarChange; on configuration object - public delegate void CalendarEvent(string practitionerId, DateTime dtvalue);

view this post on Zulip Brett Esler (Mar 20 2020 at 02:41):

hides away some FHIR calls...

view this post on Zulip Brett Esler (Mar 20 2020 at 02:41):

better to do in the app I think....

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:42):

So I just have a method for that and then register it with your server object when it's created?

view this post on Zulip Brett Esler (Mar 20 2020 at 02:45):

Might be better to keep the FHIR searches and logic in the app - so potentially could be supported by others; I have some magic in there...

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:47):

If it is just the trigger to indicate a refresh, that's what I was planning to do in there if needed.

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 02:47):

Can keep to timer for now.

view this post on Zulip Grahame Grieve (Mar 20 2020 at 07:26):

how should we handle network errors? Just suppress them?

view this post on Zulip Jiawei (Mar 20 2020 at 10:04):

should be not a problem if we have a db server (or cloud db service) But I think we can do this later.

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 11:33):

Log locally is about all, and flag to the UI that it hasn't happened

view this post on Zulip Grahame Grieve (Mar 20 2020 at 11:35):

ok. better get an interface for that too...

view this post on Zulip Grahame Grieve (Mar 20 2020 at 11:35):

System.IO.FileNotFoundException: 'Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.'

duh. I'm sure this is obvious for a non C# -newbie, I have no idea...

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 11:39):

Where did you get that, trying to run the app, copying it, or the unit test stuff.

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 11:40):

I was just about to pull anything down and keep going on cleaning up the front end.
(and watching the series Pandemic on Netflix)

view this post on Zulip Brett Esler (Mar 20 2020 at 11:59):

i am nearly up to pushing oridashi start up library... I am battiling some obsoleted stuff in FHIR .NET client -dropping back to 1.2.0 would not be a show stopper would it? I will fix my end soon...

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:02):

running the test case. O

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:02):

I'll commit

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:10):

ok I committed. Hopefully I didn't screw things up

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:23):

yeah well, I did. I committed my actual twilio token by mistake in app.config

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:24):

twilio emailed me after about 60 seconds to tell me I'd done it - impressive

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:25):

but we really need do something about where the token lives

view this post on Zulip Grahame Grieve (Mar 20 2020 at 12:25):

Brett, if you try the twilio receive test, do you get am assembly error?

view this post on Zulip Brian Postlethwaite (Mar 20 2020 at 12:45):

TwilioTests.cs isn't in the commit?

view this post on Zulip Vadim Peretokin (Mar 20 2020 at 17:55):

Anything I can work on?

view this post on Zulip Grahame Grieve (Mar 20 2020 at 18:42):

What's ClinicArrrvials.Server?

view this post on Zulip Grahame Grieve (Mar 20 2020 at 18:42):

I added TwilioTests.cs

view this post on Zulip Grahame Grieve (Mar 20 2020 at 18:42):

@Vadim, I do not know

view this post on Zulip Grahame Grieve (Mar 20 2020 at 18:59):

@Vadim Peretokin you could help me figure out why I get this baffling loading error running the tests

view this post on Zulip Brett Esler (Mar 20 2020 at 21:07):

ClinicArrivals.Server - wrapper around the embedded FHIR server; starts it stops it

view this post on Zulip Brett Esler (Mar 20 2020 at 21:24):

think json error on tests fixed; just version reference problem methinks - now getting Authentication error for Twillio

view this post on Zulip Grahame Grieve (Mar 20 2020 at 21:46):

@Brian Postlethwaite what should we do with the twilio token? we can't keep it in App.config, since we'll have our own tokens....

view this post on Zulip Grahame Grieve (Mar 20 2020 at 21:46):

sms delivery works now; just documenting it

view this post on Zulip Brett Esler (Mar 21 2020 at 02:36):

I am planning to do a trigger to support 'come inside' message; chatting with @Grahame Grieve this will be triggered on an arrived -> start visit transition for an appointment

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 03:27):

As in a call to the PMS?

view this post on Zulip Brett Esler (Mar 21 2020 at 03:33):

other way; when they start visit in PMS from waiting room (arrived) will be trigger to SMS; I am going down the path of adding a Fulfilled list of appointments (new one added to Expected, Waiting) and a PmsAppointment.ReadyToBeNotifiedToComeInside flag that will be set when this transition occurs; then can write a worker to process fulfilled list of PmsAppointments to see ready to be notified; and then notify by SMS

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 03:41):

Fulfilled list of appts?

view this post on Zulip Brett Esler (Mar 21 2020 at 03:43):

Just going to hold them in the model- could show if you like on screen; as they would hold the 'notified' flags ready to notiify; have notified

view this post on Zulip Grahame Grieve (Mar 21 2020 at 03:57):

I

view this post on Zulip Grahame Grieve (Mar 21 2020 at 03:57):

I'm not sure I follow who's holding what here?

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 04:03):

I'm merging changes at the moment, then will push and we can chat about it

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 04:23):

And thanks Brett for the other set of merges to do :grinning:

view this post on Zulip Brett Esler (Mar 21 2020 at 04:25):

sorry did not mean too... :frown:

view this post on Zulip Brett Esler (Mar 21 2020 at 04:26):

there is an issue with BP database permissions in samples mode preventing update to 'arrived' via API; so have switched to live

view this post on Zulip Brett Esler (Mar 21 2020 at 04:27):

want some VM's to review progress ?

view this post on Zulip Grahame Grieve (Mar 21 2020 at 04:31):

sounds like a good idea

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 04:32):

Just pushed my changes...

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 04:32):

Sorry Brett, some of that last batch I've had to rewind.

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 04:34):

If you switch from examples to live (or vise versa), then you have to restart the app

view this post on Zulip Grahame Grieve (Mar 21 2020 at 08:13):

ok I need a GUID associated with the clinic on install, that's persistent across executions of the application

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 09:02):

Is that needed across the org, or just the desktop?

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 09:02):

We can put it into the Settings and Guid.NewGuid() to create it.

view this post on Zulip Grahame Grieve (Mar 21 2020 at 09:19):

well, it's one for the org

view this post on Zulip Grahame Grieve (Mar 21 2020 at 09:19):

yes agree

view this post on Zulip Brian Postlethwaite (Mar 21 2020 at 09:46):

Would you like the value to be visible on the page for diagnostics?

view this post on Zulip Grahame Grieve (Mar 21 2020 at 09:59):

yeah I think so

view this post on Zulip Grahame Grieve (Mar 21 2020 at 09:59):

though it only has use in the video conferencing


Last updated: Apr 12 2022 at 19:14 UTC