FHIR: Get all encounters, patients, appointments for the practice - hl7-fhir

I'm trying to use FHIR to pull all patients, encounters and appointments into an intermediate database for further analysis. Most of the FHIR API's appear to be designed to handle one patient ID at a time, or one encounter at a time, etc. What is the most efficient way to pull the full set of encounters and then keep it current, as well as appointments, etc.?

Please take a look at the FHIR specification website, specifically the page about the RESTFul API and look at search. The APIs have methods to support the interactions described on the website.

Related

Opening a public folder item via code and confusion about ids

After some reading I'm beginning to understand that there are multiple formats for the various ids used in exchange and Outlook. I'm trying to clear up some confusion, here is the scenario.
We have a vendor product that is crawling public folder content in Exchange server and identifying messages that meet certain criteria. When this software captures each message it stores an id that looks similar to the following:
AAIARgAAAAAAGkRzkKpmEc2byACqAC/EWgkAzDDxpv7lakqqtxgSLYsXTwAAAoOedgAA+v7vRoYnskqzbHwT4KwucwAAIH9adQAALgAAAAAAGkRzkKpmEc2byACqAC/EWgMAzDDxpv7lakqqtxgSLYsXTwAAAoOedgAA
I'm responsible for writing a WinForms application that presents these messages in a list and among other things allows them to open the message in Outlook. For purposes of this question, you may assume the user has access to the message.
In looking through the Outlook API and inspecting the message properties it looks like the only id I can find there takes the form:
000000001A447390AA6611CD9BC800AA002FC45A0900CC30F1A6FEE56A4AAAB718122D8B174F000002839E760000FAFEEF468627B24AB36C7C13E0AC2E730000207F5A750000
I've read material that suggests these could be the same id expressed in different formats but have had no luck using the ConvertId operation in the EWS services.
Can anyone confirm whether these are truly different representations of the same id or completely different entities? And whether it is possible to get from one to the other?
These are not the same ids - they are different ids referring to the same object.
If you are having problems with the ConvertId EWS separation, you might want to post a separate ConvertId specific question.

Mix Panel API web segmentation and personalisation

Hi I am interested in using Mix Panel on a web site to track customers events. I would like to know if there is any way to use the api to personalise the web site per customer, similar to segmentation for emails.
I would like to query the api for a singular customer asking whether they have achieved several events.
For example something like
If customer has clicked out and last visit greater than a month ago display a banner advert.
Mixpanel does not seem like a correct tool for the job you describe here.
While theoretically this might be possible (via Mixpanel's HTTP API), this will create unnecessary architectural complexity and add extra latency. If you need to customize your web site per user, store any user state in a database like MySQL or PostgreSQL. This will be both faster and easier.

How can the performance of LUIS models be improved?

If you have used the Language Understanding Service (LUIS) which is part of Cognitive Services suite from Microsoft, you probably have come to the point where you needed to improve the performance of your models at predicting intents.
LUIS allows you to train models based on sample utterances which you supply either interactively or in batches. In addition, I would like to have the chat logs showing utterances which are wrongly classified by the model so I can use them as a basis for new training data-sets.
I would imagine that such feature would be released in future but in the meantime, does anyone have a work-around for this scenario?
I think a good way to implement this (by hand), would be to route all the messages that were wrongly classified to some kind of storage or log so you could in the future use them to retrain your LUIS model. In fact, you could use LUIS API to make calls dynamically and easily with the data in your log.
So, the flow would be something like this:
1) User send message to bot.
2) Bot logic tries to match message's intent using LUIS model.
3) An intent isn't found or the value associated to the result is really low.
4) Grab that message and store it somewhere (from a simple txt file stored in an Azure Blob Storage), or in in a Database (Table Storage, DocumentDB or SQL Server).
5) Make a simple program that for each line in your log makes you choose an intent and then it calls LUIS Api to retrain.
So, I found the closest thing to what I had in mind when I asked the question.
Right on the "MyApps" page on luis.ai there's the possibility to download the chat logs in which one can see the entire set of interactions between users and the bot. It could be a good starting point for picking out intents which were wrongly classified.
I attached a screenshot to indicate the link
The only caveat is that the log chat format is currently in .csv which isn't so readable. Hopefully LUIS supports json formatted logs soon.

how to implement Complex Web API queries in ASP Core

I'm new to web API design, so I've tried to learn best practices of web API design using these articles:
1.Microsoft REST API Guidelines
2.Web API Design-Crafting Interfaces that Developers Love from "Apigee"
Apigee is recommending web API developers to use these recommendations to have better APIs.
I quote here two of the recommendations:
I need C# code for implementing these recommendations in my Web APIs (in ASP Core) which is a back-end for native mobile apps and AngularJs web site.
Sweep complexity behind the ‘?’
Most APIs have intricacies beyond the base level of a resource. Complexities can include many states that can be updated, changed, queried, as well as the attributes associated with
a resource.
Make it simple for developers to use the base URL by putting optional states and attributes behind the HTTP question mark. To get all red dogs running in the park:
GET /dogs?color=red&state=running&location=park
Partial response allows you to give developers just the information they need.
Take for example a request for a tweet on the Twitter API. You'll get much more than a typical twitter app often needs - including the name of person, the text of the tweet, a timestamp, how often the message was re-tweeted, and a lot of metadata.
Let's look at how several leading APIs handle giving developers just what they need in
responses, including Google who pioneered the idea of partial response.
LinkedIn
/people:(id,first-name,last-name,industry)
This request on a person returns the ID, first name, last name, and the industry.
LinkedIn does partial selection using this terse :(...) syntax which isn't self-evident.
Plus it's difficult for a developer to reverse engineer the meaning using a search engine.
Facebook
/joe.smith/friends?fields=id,name,picture
Google
?fields=title,media:group(media:thumbnail)
Google and Facebook have a similar approach, which works well.
They each have an optional parameter called fields after which you put the names of fieldsyou want to be returned.
As you see in this example, you can also put sub-objects in responses to pull in other information from additional resources.
Add optional fields in a comma-delimited list
The Google approach works extremely well.
Here's how to get just the information we need from our dogs API using this approach:
/dogs?fields=name,color,location
Now I need C# code that handles these kind of queries or even more complex like this:
api/books/?publisher=Jat&Writer=tom&location=LA?fields=title,ISBN?$orderBy=location desc,writerlimit=25&offset=50
So web API users will be able to send any kind of requests they want with different complexities, fields, ordering,... based on their needs.

FHIR protocol questions

We are a HISP connecting doctors and patients looking at adopting FHIR protocol. I have few questions regarding FHIR.
We are looking at serializing FHIR resources as JSON in Couchbase. Is serializing FHR resources as-is a right approach?
How can I add new resources in addition to already defined ones? I read about creating "Other" resource and define all properties as extensions.
Is it the right approach?
How can I define value sets like medication code, gender etc or any kind of lookup as a resource?
I see "Contained" resource as a way to add a reference. In some scenarios it can be expensive to send many references.
Is it possible to define a resource that has "Contained" resource but has actual value instead of reference? Here is an example:
I'm an intermediary site where patients can book appointments and I send the data to a practice's EHR. I'd like to send full patient resource instead of display name alone (see example below). How do I do this?
Part of appointment resource sample:
"participant":[{"individual":{"reference":"Patient/example","display":"Peter James Chalmers"},"required":"required","status":"accepted"},{"type":[{"coding":[{"code":"attending"}]}]
How are resources defined in FHIR correspond to C-CDA? For example, if a C-CDA document comes from a EHR, how can I transform to a FHIR resource?
If an EHR consumes only C-CDA, how can I convert FHIR resource to C-CDA before sending to EHR.
Are there push notification mechanism built in FHIR? For example, I may want to push record changes to a patient's iPhone or push changes to an EHR.
Are there open source .Net libraries for FHIR that can help us jump start?
What is the recommended way to do authentication & authorization? I'd like to use oAuth2.
Thanks.
1 . We are looking at serializing FHIR resources as JSON in Couchbase. Is serializing FHR resources as-is a right approach?
it's "a" right approach, yes. There are others
2 . How can I add new resources in addition to already defined ones? I read about creating "Other" resource and define all properties as extensions. Is it the right approach?
Yes, for now; in principle it is intended to be possible to define real additional resources, but what the rules will be are not yet defined
3 . How can I define value sets like medication code, gender etc or any kind of lookup as a resource?
using the value set resource.
4 . I see "Contained" resource as a way to add a reference. In some scenarios it can be expensive to send many references. Is it possible to define a resource that has "Contained" resource but has actual value instead of reference?
I don't know what you mean.
5 . How are resources defined in FHIR correspond to C-CDA? For example, if a C-CDA document comes from a EHR, how can I transform to a FHIR resource? If an EHR consumes only C-CDA, how can I convert FHIR resource to C-CDA before sending to EHR.
Roughly, an section corresponds to the List resource, and an entry to a resource. There's no formal published work on alignment between C-CDA and FHIR yet, though some operational work exists here:
6 . Are there push notification mechanism built in FHIR? For example, I may want to push record changes to a patient's iPhone or push changes to an EHR.
Well, in the EHR case, the EHR should offer a FHIR server, and you create/update on the EHR. For a mobile client, the rules are different. You can't just push stuff at a phone, you need some kind of client initiation. We have added Subscriptions to the development version of FHIR (see the continuous build), but these are not in the DSTU version
7 . Are there open source .Net libraries for FHIR that can help us jump start?"
yes. see http://hl7.org/fhir/downloads.html
8 . What is the recommended way to do authentication & authorization? I'd like to use oAuth2.
We recommend OAuth

Resources