Stream: clinic-arrivals
Topic: Description
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 ?
Grahame Grieve (Mar 18 2020 at 20:15):
I guess I should move this into a md file in the repo...
Grahame Grieve (Mar 18 2020 at 20:23):
https://github.com/grahamegrieve/ClinicArrivals/blob/master/documentation.md
Grahame Grieve (Mar 18 2020 at 20:28):
Adding @Andy Bond
Vadim Peretokin (Mar 18 2020 at 20:31):
Hey all
Grahame Grieve (Mar 18 2020 at 20:31):
hi
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...
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
Grahame Grieve (Mar 18 2020 at 20:34):
sms is the starting point because it ducks all sorts of authentication issues.
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
Grahame Grieve (Mar 18 2020 at 20:35):
I have. We're going to start with Twilio - it's easy
Grahame Grieve (Mar 18 2020 at 20:36):
simple json based web calls
Vadim Peretokin (Mar 18 2020 at 20:36):
okay. Got an idea for me to work on?
Grahame Grieve (Mar 18 2020 at 20:37):
waiting to hear from @Brian Postlethwaite
Vadim Peretokin (Mar 18 2020 at 20:38):
I'll check back in tomorrow morning
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.
Grahame Grieve (Mar 18 2020 at 21:01):
@Reuben Daniels added
Andy Bond (Mar 18 2020 at 21:12):
I dropped a message to James and Michael.
Brian Postlethwaite (Mar 18 2020 at 22:42):
Have had a chat with Brett, will get a skeleton together tonight tomorrow.
(already started)
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?
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
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?
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
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
Grahame Grieve (Mar 19 2020 at 05:19):
well, we'll just use the number for now without worrying about that, i think
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...
Grahame Grieve (Mar 19 2020 at 05:20):
yes if they have that they don't have an SMS for me
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
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
Grahame Grieve (Mar 19 2020 at 05:24):
hang on = "arrived" = they are waiting in the car park, right?
Grahame Grieve (Mar 19 2020 at 05:24):
that doesn't trigger the come inside message
Brett Esler (Mar 19 2020 at 05:25):
problem is we don't have a come inside trigger in the workflow
Grahame Grieve (Mar 19 2020 at 05:25):
right. that came up in the clinic today
Brett Esler (Mar 19 2020 at 05:25):
we could do arrived if they respond to the SMS outside
Grahame Grieve (Mar 19 2020 at 05:25):
you mean "there isn't a step in the PMS for 'go to room X'" ?
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
Brett Esler (Mar 19 2020 at 05:26):
rooms aren't a resource
Brett Esler (Mar 19 2020 at 05:26):
in appointments system
Brett Esler (Mar 19 2020 at 05:27):
there is a 'seeing doctor' state
Brett Esler (Mar 19 2020 at 05:28):
can walkthough on a call if that helps...
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
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...
Grahame Grieve (Mar 19 2020 at 05:36):
"when practice is ready for patient" - what is that? when they're in the car park?
Grahame Grieve (Mar 19 2020 at 05:36):
30-60x ok
Grahame Grieve (Mar 19 2020 at 05:37):
doesn't the clinic want confirmation that the patient is outside in the PMS?
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?
Brett Esler (Mar 19 2020 at 05:37):
they could do.. that would have to be an SMS exchange
Grahame Grieve (Mar 19 2020 at 05:37):
right that's what we want
Brett Esler (Mar 19 2020 at 05:38):
so sequence changes there:
Grahame Grieve (Mar 19 2020 at 05:38):
Clinic doesn't want doctor in the corridor if we can avoid id
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
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
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
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
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
Brett Esler (Mar 19 2020 at 05:46):
yep - and means multiple frontdesk seats works fine
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
Grahame Grieve (Mar 19 2020 at 05:46):
has to be client/server now, right? :-(
Brett Esler (Mar 19 2020 at 05:47):
nope - can do all this on a single desktop; copy deploy no admin
Grahame Grieve (Mar 19 2020 at 05:48):
so the UI on;y runs on one desktop? Still needs a database?
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
Brett Esler (Mar 19 2020 at 05:55):
plan was to be completely hands off except for unkown response on SMS issues
Brett Esler (Mar 19 2020 at 05:55):
just use PMS to control the triggers
Grahame Grieve (Mar 19 2020 at 08:15):
need a db to survive a crash. We don't need multiple desktops rigth?
Grahame Grieve (Mar 19 2020 at 08:16):
so it's just continuity on the one desktop
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...
Brett Esler (Mar 19 2020 at 08:26):
we can do file copy; no admin install by download or clickonce launch pretty successfully..
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
Brian Postlethwaite (Mar 19 2020 at 14:01):
Will be committing stuff soon
Brian Postlethwaite (Mar 19 2020 at 14:35):
I created some todo's around the SMS messaging area.
Most specifically in the ReceiveMessages space
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.
Brian Postlethwaite (Mar 19 2020 at 14:37):
Settings are in the config file
https://github.com/grahamegrieve/ClinicArrivals/blob/master/ClinicArrivals/App.config
Brian Postlethwaite (Mar 19 2020 at 14:38):
Could put in a page to edit this content.
(and save it back into the file)
Vadim Peretokin (Mar 19 2020 at 15:58):
Let me know what I can help with tonight.
Shovan Roy (Mar 19 2020 at 20:28):
(deleted)
Grahame Grieve (Mar 20 2020 at 01:31):
@Brett Esler can you get patient language on the API?
Grahame Grieve (Mar 20 2020 at 01:46):
ok, I've updated the documentation after discussion with Nathan and Mukesh.
Brian Postlethwaite (Mar 20 2020 at 01:52):
I'll take a look
Brian Postlethwaite (Mar 20 2020 at 01:53):
If someone wants to grab something, the reading incoming messages from sms needs doing
Grahame Grieve (Mar 20 2020 at 01:56):
can you read the updated docuemtnation?
Grahame Grieve (Mar 20 2020 at 01:56):
and can we define an interface for the storage layer?
Brian Postlethwaite (Mar 20 2020 at 02:31):
I've pushed a commit with the Interface for the TestSmsMessaging handler
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...
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?
Grahame Grieve (Mar 20 2020 at 02:35):
no we poll.
Grahame Grieve (Mar 20 2020 at 02:35):
every 10 seconds or so
Brian Postlethwaite (Mar 20 2020 at 02:36):
Added a config setting for that interval
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
Grahame Grieve (Mar 20 2020 at 02:36):
make what an event?
Brett Esler (Mar 20 2020 at 02:37):
detecting the change in status for one appointment; based on the poll data anyway...
Brett Esler (Mar 20 2020 at 02:38):
same stuff really...
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);
Brett Esler (Mar 20 2020 at 02:41):
hides away some FHIR calls...
Brett Esler (Mar 20 2020 at 02:41):
better to do in the app I think....
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?
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...
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.
Brian Postlethwaite (Mar 20 2020 at 02:47):
Can keep to timer for now.
Grahame Grieve (Mar 20 2020 at 07:26):
how should we handle network errors? Just suppress them?
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.
Brian Postlethwaite (Mar 20 2020 at 11:33):
Log locally is about all, and flag to the UI that it hasn't happened
Grahame Grieve (Mar 20 2020 at 11:35):
ok. better get an interface for that too...
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...
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.
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)
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...
Grahame Grieve (Mar 20 2020 at 12:02):
running the test case. O
Grahame Grieve (Mar 20 2020 at 12:02):
I'll commit
Grahame Grieve (Mar 20 2020 at 12:10):
ok I committed. Hopefully I didn't screw things up
Grahame Grieve (Mar 20 2020 at 12:23):
yeah well, I did. I committed my actual twilio token by mistake in app.config
Grahame Grieve (Mar 20 2020 at 12:24):
twilio emailed me after about 60 seconds to tell me I'd done it - impressive
Grahame Grieve (Mar 20 2020 at 12:25):
but we really need do something about where the token lives
Grahame Grieve (Mar 20 2020 at 12:25):
Brett, if you try the twilio receive test, do you get am assembly error?
Brian Postlethwaite (Mar 20 2020 at 12:45):
TwilioTests.cs isn't in the commit?
Vadim Peretokin (Mar 20 2020 at 17:55):
Anything I can work on?
Grahame Grieve (Mar 20 2020 at 18:42):
What's ClinicArrrvials.Server?
Grahame Grieve (Mar 20 2020 at 18:42):
I added TwilioTests.cs
Grahame Grieve (Mar 20 2020 at 18:42):
@Vadim, I do not know
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
Brett Esler (Mar 20 2020 at 21:07):
ClinicArrivals.Server - wrapper around the embedded FHIR server; starts it stops it
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
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....
Grahame Grieve (Mar 20 2020 at 21:46):
sms delivery works now; just documenting it
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
Brian Postlethwaite (Mar 21 2020 at 03:27):
As in a call to the PMS?
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
Brian Postlethwaite (Mar 21 2020 at 03:41):
Fulfilled list of appts?
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
Grahame Grieve (Mar 21 2020 at 03:57):
I
Grahame Grieve (Mar 21 2020 at 03:57):
I'm not sure I follow who's holding what here?
Brian Postlethwaite (Mar 21 2020 at 04:03):
I'm merging changes at the moment, then will push and we can chat about it
Brian Postlethwaite (Mar 21 2020 at 04:23):
And thanks Brett for the other set of merges to do :grinning:
Brett Esler (Mar 21 2020 at 04:25):
sorry did not mean too... :frown:
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
Brett Esler (Mar 21 2020 at 04:27):
want some VM's to review progress ?
Grahame Grieve (Mar 21 2020 at 04:31):
sounds like a good idea
Brian Postlethwaite (Mar 21 2020 at 04:32):
Just pushed my changes...
Brian Postlethwaite (Mar 21 2020 at 04:32):
Sorry Brett, some of that last batch I've had to rewind.
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
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
Brian Postlethwaite (Mar 21 2020 at 09:02):
Is that needed across the org, or just the desktop?
Brian Postlethwaite (Mar 21 2020 at 09:02):
We can put it into the Settings and Guid.NewGuid()
to create it.
Grahame Grieve (Mar 21 2020 at 09:19):
well, it's one for the org
Grahame Grieve (Mar 21 2020 at 09:19):
yes agree
Brian Postlethwaite (Mar 21 2020 at 09:46):
Would you like the value to be visible on the page for diagnostics?
Grahame Grieve (Mar 21 2020 at 09:59):
yeah I think so
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