260 likes | 419 Views
Building a Windows Client. Brian Postlethwaite Phoenix, AZ - May 2014. Who am I?. Name: Brian Postlethwaite Company: DCA eHealth Solutions, Australia Background: HL7 Patient Administration team OMG Healthcare DTF: ServD Standard Solutions Architect Contact: bpostlethwaite@data.com.au.
E N D
Building a Windows Client Brian Postlethwaite Phoenix, AZ - May 2014
Who am I? • Name: Brian Postlethwaite • Company: DCA eHealth Solutions, Australia • Background: • HL7 Patient Administration team • OMG Healthcare DTF: ServD Standard • Solutions Architect • Contact: • bpostlethwaite@data.com.au
Introductions Who is building with .NET? Who is using the fhir API? Who grabs it from Github/NuGet? Which Platform(s) are you targeting?
Contents… • fhir .NET Model / API • Where to get them • Building your own API • And contribute! • MVVM quick overview • Make a View Model • Sharing Code • “Tweaking” code
What is the fhir Model/API? • Object Model • Validation • Cardinality • Contained Objects • Extensions • API • Parsers/Serialization • Utilities • Validators • Simplified Common Operations
Why not native? Own code – Must maintain it Need to consider both formats (json/xml) Handle extensions cleanly Both formats have their own “specifics” XML and json are best represented on the wire in different ways The fhir client has been extensively tested, and continues to grow
Where can nuGet It? • NuGet! • Directly from within Visual Studio
Where else can I Git It? • GitHub! • https://github.com/ewoutkramer/fhir-net-api • Location of the API Source • Mirror of the HL7 Forge c# model code • Which can be downloaded from the fhir site • Easier to see the history and change • Build and Contribute! • Contains .NET 4.0/4.5/PCL 4.5 projects
Documentation http://ewoutkramer.github.io/fhir-net-api/
Data-Binding Properties in object INotifyPropertyChanged Events Observable Collections Converters IValueConverter INotifyPropertyChanged was recently added to the basic Model objects
Commands • For use with Data-binding functionality • Class that derives from ICommand • Supports enabling/disabling • Example Commands • Search • Clear • Save
Test Data • Create some test data (patient-test-data.xaml) • Create “test data in code” • Use in the design surface • Issues: • The fhir model uses nested classes(Not supported by the test data xaml stuff) • To overcome this, for the properties that you intend to data-bind, create simple properties that encapsulate nested classes
My App Project Structure • fhir place Solution • dca.fhir.Model (PCL) • fhir-place-wpf (net 4.0) • fhir-place-win8 (Net 4.5) • fhir-place-Phone8 (Silverlight 8) • fhir-place (univeral app) *new* • fhir-place.Windows (Windows 8.1) • fhir-place.WindowsPhone (Windows Phone 8.1) • fhir-place.Shared
Design Your Model / View Model What is your app trying to display? What user interactions are planned? What form factors are you covering? What is your navigation model? What are the connectivity issues? Error handling/reporting? User Interface control requirements? Security?
Demo App Server textbox Search for Name textbox Search Button Total Results counter Search Command Patient List results Patient Item User Control
Full Search Patient App Demonstration
My Apps Simple Patient Viewers Wrapped Model Cached Reference Items Recent Viewed List Patient Demographics, Allergies, Conditions, Medication Statements, Observations (with Charts) Aggregates results from multiple servers To be published in the Microsoft App Stores
My Apps Simple Patient Viewer Concept Doctor Viewing Patient Records in the field (well golf course!)
My Apps Concept Emergency Room App(Bed End or Nurse’s Mobile Device)
Try it yourself! Repeat my live demonstration app! Do it for a different resource type Point it at your own fhir server!