Sunday, 21 July 2013

#FHIR server 2 - what is better than one FHIR server?

Okay - so now some basic support for getting and searching for some types of resources in my first FHIR server is up and running I thought it time to clean up my framework and show why one might do standards in the first place....

The first FHIR server up for a while  is wrapping Australian primary care system 'Best Practice'; it's major competitor in the clinical system market is 'Medical Director'  - all together these comprise approximately 85% of the clinician seats in use.  So it was time to start wrapping 'Medical Director' so it to could be accessed via the FHIR REST interfacing.

To begin with this second server only supports conformance, patient, condition and procedure resources - but this will be expanded in scope soon to match the first server.

There are some interesting things remaining to address:

  • history - very keen to support this interaction; want to play with feeds used to aggregate data
  • tools - looking at using FHIR based client tools to deliver functionality for multiple clinical systems

Check out some samples at http://www.oridashi.com.au/fhir now 2 servers!



Wednesday, 17 July 2013

#FHIR conformance and update

Server now with conformance metadata http://demo.oridashi.com.au:8190/metadata

This allows a FHIR server to present some indication of conformance in terms of:

  • FHIR resources supported
  • REST operations supported  e.g. read, vread, search, history (see: REST details)
  • FHIR version
  • Server version
  • Release dates
  • Publisher name
Currently working on building conformance statements directly from code generation.


Along the way some other samples and additions have popped up:


Check out some samples at http://www.oridashi.com.au/fhir now FHIR v0.10

Wednesday, 10 July 2013

#healthit Secure Messaging Presentation

My secure message delivery standards review presentation  at HL7 Australia Workshop July 4th 2013

#FHIR update to build 1511

Added some features and reworked for updates to resources for build 1511.

Resource changes:

  • Problem changed to Condition resource
  • Flattening of Patient resource
  • Flattening of the Procedure resource
Some search capability added also particularly to provide bundles for specified patient.
 e..g conditons for a patient

e.g. medication prescriptions for a patient

http://demo.oridashi.com.au:8190/medicationprescription/search?patient._id=9

Check out some samples at http://www.oridashi.com.au/fhir

Tuesday, 14 May 2013

#FHIR Connectathon 3

I had a long night participating in FHIR Connectathon 3 the main objective for me was to get a couple features done and have some real interaction with FHIR client apps.

I participated remotely which is really not the best.... after all I miss all the action at dinner!  But thanks to skype I was reasonably connected.  The timezone was the killer 11pm-6am is a bit of a stretch for this old man.

Happily managed to get some interaction happening; really only patient resource but managed to get paging information added to ATOM feed and put in some support for JSON representation of the feed.

Since connectathon completed I have added MedicationPrescription and Procedure resources.

Still to do - search parameters for all of the resources (except Patient) and history operation.

Reference - Oridashi Hiasobi FHIR Server: http://www.oridashi.com.au/fhir




Friday, 26 April 2013

Fun and Games

#FHIR Aha!  I have worked out my occasional mysterious FHIR server non-responsiveness - this made me laugh....

When you switch from static IP to DHCP on your network REMEMBER TO CHECK YOUR XBOX!

Apparently when my XBox was in action my FHIR service was sometimes not - static IP conflict.  I look forward to the day my XBox is hosting my family's health record (or at least the personal fitness games activity logs - 'PhysicalActivity' resource?) but that was not my immediate plan!

Hopefully now when my kids are playing A Kingdom for Keflings my FHIR server will be unaffected.

Thursday, 11 April 2013

FHIR Problems

Problems of all kinds came to notice in my last batch of FHIR development.

The Problem resource was implemented! Importantly it should be noted that this has the tag "Status: Not an approved resource" so basically fills the space until the discussion is done.  After seeing some of the diagnosis vs concern vs problem discussion of the past this may take some commitment to accept 'good enough' for draft standard.  Committee discussions are due Thursday 18 April at 5:00pm to 6:30pm US Eastern - TC Details.

Try out some examples
  http://demo.oridashi.com.au:8190/problem/@30
  http://demo.oridashi.com.au:8190/problem/@32

Some other problems also came up whilst getting this done:

#1 Type Choice  I never read the specification properly with respect to 'choice' attributes - which just goes to prove you can kind of implement FHIR without reading the documentation too well. The key words from the spec are:

When a logical element can have more than one type, it's name takes the form nnn[x]. The "nnn" part of the name is constant, and the [x] is replaced with the name of the type that is actually used. The types that are allowed are listed with a "|" used to separate them

For example from the Problem resource a couple of the attributes have a type choice:

 <onset[x]><!-- 0..1 date|Age Estimated or actual date, or age --></onset[x]>
 <abatement[x]><!-- 0..1 date|Age|boolean If/when in resolution/remission --></abatement[x]>

So this really equates to elements named: onsetDate, onsetAge and abatementDate, abatementAge, abatementBoolean.  In my case onsetDate and abatementBoolean suit my source data best so they are what you see in the examples.

In my hasty initial implementation my code generation skipped over all the type choices and instead just chose the first type listed and the element name without the type.  Only when I looked for my abatementBoolean to mark problem as 'inactive' did I discover my implementation hole.

So to get by I went for my classic xsd.exe style choice for XML serialization:

[XmlElement(ElementName = "onsetDate", Type = typeof(FhirDate))]
[XmlElement(ElementName = "onsetAge", Type = typeof(FhirAge))]
public object Onset { get; set; }

All fine right? Now try and get it done with JSON serialization... Hmmmm.... how do I do a 'choice' in JSON?  If you have suggestions let me know - this is what I came up with...

Using Newtonsoft.Json add [JsonIgnore] to the above.
Then add specific properties for each type - note this is only good for my read/only needs e.g.

[JsonProperty(PropertyName = "onsetDate", Order = 9)] 
public FhirDate OnsetDate { get { return Onset as FhirDate; } }

[JsonProperty(PropertyName = "onsetAge", Order = 10)] 
 public FhirAge OnsetAge { get { return Onset as FhirAge; } }

It will do for today!  It means when value is set then correctly named JSON data is produced.

#2 Text Encoding did it to me again... so many times I have got this wrong... I shouldn't mess it up but I often do.  I don't think I am alone ;).

FHIR specification has: The character set for a resource is always Unicode, encoded in UTF-8. Specifying the character encoding in the XML is optional but recommended.

Yes it was wrong - now I think it is right!  Take note and take care!

I think I need to take a serious look at the Connectathon 3 scenarios... maybe next blog.


Reference - Oridashi Hiasobi FHIR Server: http://www.oridashi.com.au/fhir