© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
HL7 FHIR Training
course
Ewout Kramer
March 2014
Name (SSID):
Password:
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Who am I?
 Name: Ewout Kramer
 Company: Furore, Amsterdam
 Background:
 FHIR core team, RIMBAA
 Software developer & healthcare
architect
 Contact:
 e.kramer@furore.com
 www.thefhirplace.com
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Introduce ourselves
 About your organization…
 HL7 (v2/v3) background?
 How did you hear about FHIR?
 Platform of choice (.NET, Java, Ruby, …)?
 Familiar with HTTP, Xml, JSON, REST?
 Persistence technologies used?
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Morning program
 Introduction to FHIR
 the Resource and REST
 Exercise #1
 Deconstructing the FHIR data model
 Exercise #2
 LUNCH
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
INTRODUCTION TO FHIR
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Relative – No technology can make integration as fast as we’d like
That’s why we’re here
Building blocks – more on these to follow
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
“How can I get data from my
server to my iOS app?”
“How do I connect my applications
using cloud storage?”
“How can I give record-based
standardized access to my PHR?”
The Need
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.8
Highrise
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
FHIR Manifesto
 Focus on implementers
 Keep common scenarios simple
 Leverage existing technologies
 Provide human readability
 Make content freely available
 Demonstrate best practice governance
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Implementer Focus
 Specification is written for one target audience:
implementers
 Rationale, modeling approaches, etc. kept elsewhere
 Multiple reference implementations from day 1
 Publicly available test servers
 Starter APIs published with spec
 Delphi, C#, Java – more to come
 Connectathons to verify specification approaches
 Instances you can read and understand 
 Lots of examples (and they’re valid too)
using HL7.Fhir.Instance.Model;
using HL7.Fhir.Instance.Parsers;
using HL7.Fhir.Instance.Support;
XmlReader xr = XmlReader.Create(
new StreamRead
IFhirReader r = new XmlFhirReader
// JsonTextReader jr = new JsonTe
// new StreamRead
// IFhirReader r = new JsonFhirRe
ErrorList errors = new ErrorList(
LabReport rep = (LabReport)Resour
Assert.IsTrue(errors.Count() == 0
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
WHAT’S IN THE BOX?
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Patient Prescription
Resources
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Cover all usecases -
(n)ever
13
HL7v3 RIM
Generic
HL7 CDA
C-CCD
openEHR RM
HL7v2
IHE PDQ
FHIR
Specific
openEHR
Archetypes
openEHR
Templates
HL7v3
CMETS
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
The 80/20 rule
 Design for the 80%, not 100%
 Only include data elements in the artifacts if 80%
of all implementers of that artifact will use the data
element
 Allow easy extension for the remaining 20%
of elements
 which often make up 80% of current specs
 Vocabulary approach to extension definition
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Kinds of Resources
 Administrative Concepts
 Patient, Organization, Device, Location
 Clinical Concepts
 Allergy, Condition, Medication, Family History
 Care Plan
 Infrastructure Functionality
 Document, Message, Conformance/Profiling
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
+ =
Extensibility
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
The Case for Extensions
 Simple choice – design for absolutely
everything or allow extensions
 Everyone needs extensions, everyone
hates them
 Define, publish, find extensions
 Repository
 Documented just like resources
 Can be fetched & interpreted by clients
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 627
Content-Location: /fhir/person/@1/history/@1
Last-Modified: Tue, 29 May 2012 23:45:32 GMT
ETag: "1“
"Person":{"id":{"value":"1"},"identifier":[{"type":{"co
de":"ssn","system":"http://hl7.org/fhir/sid
Transport
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Just follow the industry...
 Exchanges use XML & JSON
 Collections represented using ATOM
 Same technology that gives you your daily news
summary
 Out-of-the-box publish/subscribe
 Support for REST: Web calls work the same
way they do for Facebook & Twitter
 Rely on HTTPS, OAuth, etc. for security
functions
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Paradigms
 FHIR supports 4 interoperability paradigms
REST Documents
Messages Services
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Cross-paradigms
 Regardless of paradigm the content is the same
 This means it’s straight-forward to share content
across paradigms
 E.g. Receive a lab result in a message. Package
it in a discharge summary document
 It also means constraints can be shared across
paradigms
 E.g. Define a profile for Blood Pressure and use it
on resources in messages, documents, REST and
services
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
DESIGN OF THE
RESOURCE
Looking at FHIR Resources from a software engineering perspective
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Resources
 “Resources” are:
 Small logically discrete units of exchange
 Defined behaviour and meaning
 Known identity / location
 Smallest unit of transaction
 “of interest” to healthcare
 V2: Sort of like Segments
 V3: Sort of like CMETs
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
What is/isn’t a Resource?
Examples
 Administrative
 Patient, Location, Encounte
r, Organization,
 Clinical Concepts
 AllergyIntolerance, Questio
nnaire, Observation
 Infrastructure
 Document, Message, Profil
e, Conformance
Non-examples
 Gender
 Too small
 Blood Pressure
 Too specific
 Pregnancy
 Too broad
 Electronic Health Record
 Too big
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Resource
Narrative
Elements
ExtensionsExtensions
Structure of a Resource
Metadata
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Structure of a Resource
(XML example)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Human Readable
 CDA taught HL7 a very important lesson
 Even if the computers don’t understand 99% of
what you’re sending, that’s ok if they can properly
render it to a human clinician
 This doesn’t just hold for documents –
important for messages, services, etc.
 In FHIR, every resource is required to
have a human-readable expression
 Can be direct rendering or human entered
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Resources in the spec
Let’s take a look at some Resources in
the specification….
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Composition vs. reference
 FHIR makes composition and references
explicit:
 References are in between Resources. No
context conduction across references – safe
retrieval as individual resources.
 Composition is within a Resource: Components
have no meaning outside resource, no identity, no
separate access path except through resource
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Composition of a Resource
Resource Root
Resource Component
Simple & Complex
elements (may be
repeating)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Composition
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Resource Reference
Example: part of DiagnosticReport
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Network
subject
performer
organization
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Not a hierarchy!
Patient
Episode Episode
VisitVisit
Observation Order
Not an “electronic” version of a patient file…
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Resource Aggregate
“How do we know where an object
made up of other objects begins
and ends?”
“In any system with persistent storage
of data, there must be a scope for a
transaction that changes data and a way of
maintaining the consistency of the data”
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
“Business” identifiers
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
A Resource’s identity
 In fact: an URL
 http://server.org/fhir/Patient/1
endpoint
resource type
identifier
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Patient
MRN 22234
“Ewout Kramer”
30-11-1972
Amsterdam
Resource metadata
Metadata
Resource Identities
http://fhir.hl7.org/Patient/23E455A3B
http://fhir.hl7.org/Patient/23E455A3B/_history/4
Last updated
2013-12-23T23:33:01+01:00
http://hl7.org/fhir/tag/profile
http://hl7.org/fhir/Profile/us-core
http://hl7.org/fhir/tag
http://example.org/fhir/Status#Test
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
REST SERVICE INTERFACE
How FHIR uses RESTful principles to communicate Resources
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Paradigms
 FHIR supports 4 interoperability paradigms
REST Documents
Messages Services
REST
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
The Glory of REST
Source: http://martinfowler.com/articles/richardsonMaturityModel.html
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
REST?
 “REpresentational State Transfer”
 Represent your data as “resources”
 Make “Resources” URI addressable
 Use HTTP to do CRUD operations
 Resources may be exchanged using
different representations
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Just a quick GET
GET /fhir/patient/1 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/xml+fhir;charset=utf-8
Content-Length: 787
Content-Location:
http://spark.furore.com/fhir/Patient/1/_history/12
Last-Modified: Tue, 29 May 2012 23:45:32 GMT
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir"><identifier><label>SSN</label><identifier><system>
http://hl7.org/fhir/sid/usssn</system><id>444222222</id></identifier></identifier><name><use>official
</use><family>Everywoman</family><given>Eve</given></name><telecom><system>phone</system><value>555-
555 2003</value><use>work</use></telecom><gender><system>http://hl7.org/fhir/sid/v2-0001</system>
<code>F</code></gender><birthDate>1973-05-31</birthDate><address><use>home</use><line>2222 Home
Street</line></address><text><status>generated</status><div
xmlns="http://www.w3.org/1999/xhtml">Everywoman, Eve. SSN:444222222</div></text></Patient>
UTF-8
encoded
See the BOM?
HTTP Verb + path
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
A Resource’s REST identity
 In fact: an URL
 http://server.org/fhir/Patient/1
endpoint
resource type
identifier
Note: This URL resolves to the current version of a resource
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
REST “representations”
GET /fhir/Patient/1?_format=json HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json+fhir;charset=utf-8
Content-Length: 787
GET /fhir/Patient/1 HTTP/1.1
Accept: application/json+fhir
HTTP/1.1 200 OK
Content-Type: application/json+fhir;charset=utf-8
Content-Length: 787
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Patient
MRN 22234
“Ewout Kramer”
30-11-1972
Amsterdam
Remember metadata?
Metadata
Resource Identities
http://fhir.hl7.org/Patient/23E455A3B
http://fhir.hl7.org/Patient/23E455A3B/_history/4
Last updated
2013-12-23T23:33:01+01:00
http://hl7.org/fhir/tag/profile
http://hl7.org/fhir/Profile/us-core
http://hl7.org/fhir/tag
http://example.org/fhir/Status#Test
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Mapping (meta)data to
HTTP
 Resource data
 Resource id
 Resource version
 Last update date
 Tags
 http body
 Url
 Content-Location
header
 Last-Modified header
 Category header
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Tag metadata
GET /fhir/Patient/1 HTTP/1.1
HTTP/1.1 200 OK
Content-Location: http://server.com/fhir/Patient/1/_history/12
Last-Modified: Tue, 29 May 2012 23:45:32 GMT
Category: http://example.org/fhir/Status#Test;
scheme="http://hl7.org/fhir/tag"; label="Our test tag"
http://hl7.org/fhir/tag A general tag
http://hl7.org/fhir/tag/profile
A profile tag - a claim that the Resource
conforms to the profile identified in the
term
http://hl7.org/fhir/tag/security A security label
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
REST in the spec
Let’s look at these operations in the
specification….
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Mapping to verbs
create 2.1.10
The create interaction creates a new resource in a server assigned location. The create
interaction is performed by an HTTP POST operation as shown:
POST [service-url]/[resourcetype] (?_format=mimeType)
read 2.1.6
The read interaction accesses the current contents of a resource. The interaction is
performed by an HTTP GET operation as shown:
GET [service-url]/[resourcetype]/{id} (?_format=mimeType)
update 2.1.8
The update interaction creates a new current version for an existing resource or creates a
new resource if no resource already exists for the given id. The update interaction is
performed by an HTTP PUT operation as shown:
PUT [service-url]/[resourcetype]/{id} (?_format=mimeType)
delete 2.1.9
The delete interaction removes an existing resource. The interaction is performed by an
HTTP DELETE operation as shown:
DELETE [service-url]/[resourcetype]/{id}
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Exercise #1
Fiddling around with Fiddler
&
Getting data from a FHIR test
server
(45 minutes)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Break!
Coffeebreak
15 minutes
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
DECONSTRUCTING THE
FHIR DATAMODEL
The basic building blocks of FHIR
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Let’s look at datatypes
Resource
Narrative
Extensions
Metadata
Elements
Extensions
Primitives
(integer, boolean,
string, instant)
Derived
Primitives
(oid, uuid,
code, id)
Composite
Datatypes
(HumanName,
Quantity, Period,
Address, Identifier )
Constrained
Types
(Quantity:
Distance, Count,
Duration, Money)
use
use
use
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Primitives - peculiarities
boolean xs:boolean Values can be either true or false
integer xs:int A signed 32-bit integer
decimal xs:decimal
A rational number. A true decimal, with
inbuilt precision (e.g. Java BigDecimal)
instant xs:dateTime
An instant in time - known at least to the
second and always includes a
timezone.
uri xs:anyURI A Uniform Resource Identifier Reference.
date
union of xs:date,
xs:gYearMonth,
xs:gYear
A date, or partial date as used in
human communication. No time zone.
dateTime
union of xs:dateTime,
xs:date,
xs:gYearMonth,
xs:gYear
A date, date-time or partial date as used
in human communication. If hours and
minutes are specified, a time zone must
be populated.
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Derived primitives
 Using the ISO date/time with timezone
 “1951”, “1951-06” and “1951-06-04”
 “1951-06-04T10:57:34.0321+01”
 “1951-06-04T10:57:34.0321Z”
 Derived types based on uri(!): OID and
UUID
 urn:oid:1.2.3.4.5
 urn:uuid:a5afddf4-e880-459b-876e-e4591b0acc11
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Level up:
Composite Datatypes
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Datatypes
Let’s take a look at the “Data Types”
section of the FHIR specification at
http://www.hl7.org/implement/standards/fhir/datatypes.htm
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Coded types
Codes are defined in code systems
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Coded types
 When used in a Resource, the modelers
include Bindings
 Bindings specify which codes can be used
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Level up: resources
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
“Choice” properties
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
References
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Quick look at extensions
Resource
Narrative
Extensions
Metadata
Elements
Extensions
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Extending a multiple birth
Key = location of formal definition
Value = value according to definition
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Complex extensions
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Quick look at narrative
Resource
Narrative
Extensions
Metadata
Elements
Extensions
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Narrative
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Exercise #2
Editing a Resource Instance -
by hand!
(45 minutes)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Using VS / Eclipse
 Eclipse: You need the Xml editing tools and
add
<Patient xmlns="http://hl7.org/fhir"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../patient.xsd">
 VisualStudio: Go to Xml/Schemas… then
add fhir-all.xsd
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Break!
Lunch
60 minutes

FHIR Tutorial - Morning

  • 1.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. HL7 FHIR Training course Ewout Kramer March 2014 Name (SSID): Password:
  • 2.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Who am I?  Name: Ewout Kramer  Company: Furore, Amsterdam  Background:  FHIR core team, RIMBAA  Software developer & healthcare architect  Contact:  [email protected]  www.thefhirplace.com
  • 3.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Introduce ourselves  About your organization…  HL7 (v2/v3) background?  How did you hear about FHIR?  Platform of choice (.NET, Java, Ruby, …)?  Familiar with HTTP, Xml, JSON, REST?  Persistence technologies used?
  • 4.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Morning program  Introduction to FHIR  the Resource and REST  Exercise #1  Deconstructing the FHIR data model  Exercise #2  LUNCH
  • 5.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. INTRODUCTION TO FHIR
  • 6.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Relative – No technology can make integration as fast as we’d like That’s why we’re here Building blocks – more on these to follow
  • 7.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. “How can I get data from my server to my iOS app?” “How do I connect my applications using cloud storage?” “How can I give record-based standardized access to my PHR?” The Need
  • 8.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.8 Highrise
  • 9.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. FHIR Manifesto  Focus on implementers  Keep common scenarios simple  Leverage existing technologies  Provide human readability  Make content freely available  Demonstrate best practice governance
  • 10.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Implementer Focus  Specification is written for one target audience: implementers  Rationale, modeling approaches, etc. kept elsewhere  Multiple reference implementations from day 1  Publicly available test servers  Starter APIs published with spec  Delphi, C#, Java – more to come  Connectathons to verify specification approaches  Instances you can read and understand   Lots of examples (and they’re valid too) using HL7.Fhir.Instance.Model; using HL7.Fhir.Instance.Parsers; using HL7.Fhir.Instance.Support; XmlReader xr = XmlReader.Create( new StreamRead IFhirReader r = new XmlFhirReader // JsonTextReader jr = new JsonTe // new StreamRead // IFhirReader r = new JsonFhirRe ErrorList errors = new ErrorList( LabReport rep = (LabReport)Resour Assert.IsTrue(errors.Count() == 0
  • 11.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. WHAT’S IN THE BOX?
  • 12.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Patient Prescription Resources
  • 13.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Cover all usecases - (n)ever 13 HL7v3 RIM Generic HL7 CDA C-CCD openEHR RM HL7v2 IHE PDQ FHIR Specific openEHR Archetypes openEHR Templates HL7v3 CMETS
  • 14.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. The 80/20 rule  Design for the 80%, not 100%  Only include data elements in the artifacts if 80% of all implementers of that artifact will use the data element  Allow easy extension for the remaining 20% of elements  which often make up 80% of current specs  Vocabulary approach to extension definition
  • 15.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Kinds of Resources  Administrative Concepts  Patient, Organization, Device, Location  Clinical Concepts  Allergy, Condition, Medication, Family History  Care Plan  Infrastructure Functionality  Document, Message, Conformance/Profiling
  • 16.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. + = Extensibility
  • 17.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. The Case for Extensions  Simple choice – design for absolutely everything or allow extensions  Everyone needs extensions, everyone hates them  Define, publish, find extensions  Repository  Documented just like resources  Can be fetched & interpreted by clients
  • 18.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: 627 Content-Location: /fhir/person/@1/history/@1 Last-Modified: Tue, 29 May 2012 23:45:32 GMT ETag: "1“ "Person":{"id":{"value":"1"},"identifier":[{"type":{"co de":"ssn","system":"http://hl7.org/fhir/sid Transport
  • 19.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Just follow the industry...  Exchanges use XML & JSON  Collections represented using ATOM  Same technology that gives you your daily news summary  Out-of-the-box publish/subscribe  Support for REST: Web calls work the same way they do for Facebook & Twitter  Rely on HTTPS, OAuth, etc. for security functions
  • 20.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Paradigms  FHIR supports 4 interoperability paradigms REST Documents Messages Services
  • 21.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Cross-paradigms  Regardless of paradigm the content is the same  This means it’s straight-forward to share content across paradigms  E.g. Receive a lab result in a message. Package it in a discharge summary document  It also means constraints can be shared across paradigms  E.g. Define a profile for Blood Pressure and use it on resources in messages, documents, REST and services
  • 22.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. DESIGN OF THE RESOURCE Looking at FHIR Resources from a software engineering perspective
  • 23.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Resources  “Resources” are:  Small logically discrete units of exchange  Defined behaviour and meaning  Known identity / location  Smallest unit of transaction  “of interest” to healthcare  V2: Sort of like Segments  V3: Sort of like CMETs
  • 24.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. What is/isn’t a Resource? Examples  Administrative  Patient, Location, Encounte r, Organization,  Clinical Concepts  AllergyIntolerance, Questio nnaire, Observation  Infrastructure  Document, Message, Profil e, Conformance Non-examples  Gender  Too small  Blood Pressure  Too specific  Pregnancy  Too broad  Electronic Health Record  Too big
  • 25.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Resource Narrative Elements ExtensionsExtensions Structure of a Resource Metadata
  • 26.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Structure of a Resource (XML example)
  • 27.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Human Readable  CDA taught HL7 a very important lesson  Even if the computers don’t understand 99% of what you’re sending, that’s ok if they can properly render it to a human clinician  This doesn’t just hold for documents – important for messages, services, etc.  In FHIR, every resource is required to have a human-readable expression  Can be direct rendering or human entered
  • 28.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Resources in the spec Let’s take a look at some Resources in the specification….
  • 29.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Composition vs. reference  FHIR makes composition and references explicit:  References are in between Resources. No context conduction across references – safe retrieval as individual resources.  Composition is within a Resource: Components have no meaning outside resource, no identity, no separate access path except through resource
  • 30.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Composition of a Resource Resource Root Resource Component Simple & Complex elements (may be repeating)
  • 31.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Composition
  • 32.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
  • 33.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Resource Reference Example: part of DiagnosticReport
  • 34.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Network subject performer organization
  • 35.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Not a hierarchy! Patient Episode Episode VisitVisit Observation Order Not an “electronic” version of a patient file…
  • 36.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Resource Aggregate “How do we know where an object made up of other objects begins and ends?” “In any system with persistent storage of data, there must be a scope for a transaction that changes data and a way of maintaining the consistency of the data”
  • 37.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. “Business” identifiers
  • 38.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. A Resource’s identity  In fact: an URL  http://server.org/fhir/Patient/1 endpoint resource type identifier
  • 39.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Patient MRN 22234 “Ewout Kramer” 30-11-1972 Amsterdam Resource metadata Metadata Resource Identities http://fhir.hl7.org/Patient/23E455A3B http://fhir.hl7.org/Patient/23E455A3B/_history/4 Last updated 2013-12-23T23:33:01+01:00 http://hl7.org/fhir/tag/profile http://hl7.org/fhir/Profile/us-core http://hl7.org/fhir/tag http://example.org/fhir/Status#Test
  • 40.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. REST SERVICE INTERFACE How FHIR uses RESTful principles to communicate Resources
  • 41.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Paradigms  FHIR supports 4 interoperability paradigms REST Documents Messages Services REST
  • 42.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. The Glory of REST Source: http://martinfowler.com/articles/richardsonMaturityModel.html
  • 43.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. REST?  “REpresentational State Transfer”  Represent your data as “resources”  Make “Resources” URI addressable  Use HTTP to do CRUD operations  Resources may be exchanged using different representations
  • 44.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Just a quick GET GET /fhir/patient/1 HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/xml+fhir;charset=utf-8 Content-Length: 787 Content-Location: http://spark.furore.com/fhir/Patient/1/_history/12 Last-Modified: Tue, 29 May 2012 23:45:32 GMT <?xml version="1.0" encoding="UTF-8"?> <Patient xmlns="http://hl7.org/fhir"><identifier><label>SSN</label><identifier><system> http://hl7.org/fhir/sid/usssn</system><id>444222222</id></identifier></identifier><name><use>official </use><family>Everywoman</family><given>Eve</given></name><telecom><system>phone</system><value>555- 555 2003</value><use>work</use></telecom><gender><system>http://hl7.org/fhir/sid/v2-0001</system> <code>F</code></gender><birthDate>1973-05-31</birthDate><address><use>home</use><line>2222 Home Street</line></address><text><status>generated</status><div xmlns="http://www.w3.org/1999/xhtml">Everywoman, Eve. SSN:444222222</div></text></Patient> UTF-8 encoded See the BOM? HTTP Verb + path
  • 45.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. A Resource’s REST identity  In fact: an URL  http://server.org/fhir/Patient/1 endpoint resource type identifier Note: This URL resolves to the current version of a resource
  • 46.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. REST “representations” GET /fhir/Patient/1?_format=json HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/json+fhir;charset=utf-8 Content-Length: 787 GET /fhir/Patient/1 HTTP/1.1 Accept: application/json+fhir HTTP/1.1 200 OK Content-Type: application/json+fhir;charset=utf-8 Content-Length: 787
  • 47.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Patient MRN 22234 “Ewout Kramer” 30-11-1972 Amsterdam Remember metadata? Metadata Resource Identities http://fhir.hl7.org/Patient/23E455A3B http://fhir.hl7.org/Patient/23E455A3B/_history/4 Last updated 2013-12-23T23:33:01+01:00 http://hl7.org/fhir/tag/profile http://hl7.org/fhir/Profile/us-core http://hl7.org/fhir/tag http://example.org/fhir/Status#Test
  • 48.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Mapping (meta)data to HTTP  Resource data  Resource id  Resource version  Last update date  Tags  http body  Url  Content-Location header  Last-Modified header  Category header
  • 49.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Tag metadata GET /fhir/Patient/1 HTTP/1.1 HTTP/1.1 200 OK Content-Location: http://server.com/fhir/Patient/1/_history/12 Last-Modified: Tue, 29 May 2012 23:45:32 GMT Category: http://example.org/fhir/Status#Test; scheme="http://hl7.org/fhir/tag"; label="Our test tag" http://hl7.org/fhir/tag A general tag http://hl7.org/fhir/tag/profile A profile tag - a claim that the Resource conforms to the profile identified in the term http://hl7.org/fhir/tag/security A security label
  • 50.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. REST in the spec Let’s look at these operations in the specification….
  • 51.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Mapping to verbs create 2.1.10 The create interaction creates a new resource in a server assigned location. The create interaction is performed by an HTTP POST operation as shown: POST [service-url]/[resourcetype] (?_format=mimeType) read 2.1.6 The read interaction accesses the current contents of a resource. The interaction is performed by an HTTP GET operation as shown: GET [service-url]/[resourcetype]/{id} (?_format=mimeType) update 2.1.8 The update interaction creates a new current version for an existing resource or creates a new resource if no resource already exists for the given id. The update interaction is performed by an HTTP PUT operation as shown: PUT [service-url]/[resourcetype]/{id} (?_format=mimeType) delete 2.1.9 The delete interaction removes an existing resource. The interaction is performed by an HTTP DELETE operation as shown: DELETE [service-url]/[resourcetype]/{id}
  • 52.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Exercise #1 Fiddling around with Fiddler & Getting data from a FHIR test server (45 minutes)
  • 53.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Break! Coffeebreak 15 minutes
  • 54.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. DECONSTRUCTING THE FHIR DATAMODEL The basic building blocks of FHIR
  • 55.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Let’s look at datatypes Resource Narrative Extensions Metadata Elements Extensions Primitives (integer, boolean, string, instant) Derived Primitives (oid, uuid, code, id) Composite Datatypes (HumanName, Quantity, Period, Address, Identifier ) Constrained Types (Quantity: Distance, Count, Duration, Money) use use use
  • 56.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Primitives - peculiarities boolean xs:boolean Values can be either true or false integer xs:int A signed 32-bit integer decimal xs:decimal A rational number. A true decimal, with inbuilt precision (e.g. Java BigDecimal) instant xs:dateTime An instant in time - known at least to the second and always includes a timezone. uri xs:anyURI A Uniform Resource Identifier Reference. date union of xs:date, xs:gYearMonth, xs:gYear A date, or partial date as used in human communication. No time zone. dateTime union of xs:dateTime, xs:date, xs:gYearMonth, xs:gYear A date, date-time or partial date as used in human communication. If hours and minutes are specified, a time zone must be populated.
  • 57.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Derived primitives  Using the ISO date/time with timezone  “1951”, “1951-06” and “1951-06-04”  “1951-06-04T10:57:34.0321+01”  “1951-06-04T10:57:34.0321Z”  Derived types based on uri(!): OID and UUID  urn:oid:1.2.3.4.5  urn:uuid:a5afddf4-e880-459b-876e-e4591b0acc11
  • 58.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Level up: Composite Datatypes
  • 59.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Datatypes Let’s take a look at the “Data Types” section of the FHIR specification at http://www.hl7.org/implement/standards/fhir/datatypes.htm
  • 60.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Coded types Codes are defined in code systems
  • 61.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Coded types  When used in a Resource, the modelers include Bindings  Bindings specify which codes can be used
  • 62.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
  • 63.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Level up: resources
  • 64.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. “Choice” properties
  • 65.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. References
  • 66.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Quick look at extensions Resource Narrative Extensions Metadata Elements Extensions
  • 67.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Extending a multiple birth Key = location of formal definition Value = value according to definition
  • 68.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Complex extensions
  • 69.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Quick look at narrative Resource Narrative Extensions Metadata Elements Extensions
  • 70.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Narrative
  • 71.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Exercise #2 Editing a Resource Instance - by hand! (45 minutes)
  • 72.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Using VS / Eclipse  Eclipse: You need the Xml editing tools and add <Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../patient.xsd">  VisualStudio: Go to Xml/Schemas… then add fhir-all.xsd
  • 73.
    © 2012 HL7® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. Break! Lunch 60 minutes

Editor's Notes

  • #8 TheyprobablycraftsomethingthemselvesWe want HL7 to have ananswerto these.If we don’t =&gt; someoneelsewill do itand we willlosecredibility.Youcould do itusingv3, but notsolelybased on the downloadable UV-version. Andprobablynot on some country-specificImplementation Guide either (different focus, priorities)
  • #10 We don’t actually have a formal manifesto, but these are the principles we adhere to.
  • #11 Who’s read the v3 spec? – modeler &amp; balloter focusedSpec is driven by people who write codeNumerous pieces have been changed because of experience with what worked when trying to implementEven have a test workbench for RESTful servers
  • #12 9:45
  • #13 Readilyuseable, contain “the 80%” (What’s the 80%...what’s maximum reuse? That’s HL7’s core business!)Independent of context, fixeddefined behaviour and meaningCanreferenceeachotherUnits of exchange – suggests units of storage forimplementersAddressed through HTTP or other methods
  • #14 Going from Generic to Specific to ensure compatibility &amp; reuse is a great ideaThe “lower” on this slide you stop to “standardize”, the more flexible is your standard to be used in different context, but…Usually, the more specific standards based on it will diverge and not be cross-compatible (e.g. medication in CDA, CCD, message based national standards)FHIR is pretty specific, so divergence will “only” start from that specific level. Hopefullgivinging better “base” interoperabilityPeople do like re-useable blocks, standards where a prescription remains the same, whether they’re used in messages, documents, etc. CCD/C-CDA is probably popular because it tries to define such blocks across multiple uses, thus going further than the more abstract RIM classes or C-METS.
  • #17 Youcanconstrainaway stuff youdon’tneedYoucanadd stuff to the basic modelsforyourusecase“Removeandaddbricks as necessary”
  • #19 Document every resource,everyattributeProvideexamplesDefinehowtouse in REST, Document and MessageManageableby a project lead in a weekend, or you’llbeignored (in favor of localsolutions)
  • #20 We try very hard to *not* invent stuff that exists elsewhere unless it’s really broken or totally unaligned with the FHIR principles.
  • #24 Unit of storage / transaction: you cannot send “partial” updates
  • #25 And few systems will ever see more than 40-50
  • #28 Even when you think your target will understand all the encoded data, reality is data often gets shared beyond the originally intended contextAllow for exceptions for things like automated device readings, etc.
  • #29 Always the same structure: intro, UML diagram, “pseudo xml”, bindings, notes, search parametersFormal definitions, mappingsExamples!
  • #30 No context conduction: if a Condition resource references a particular Patient as it&apos;s subject, and it links to a Procedure resource as it&apos;s cause, there is no automatic rule or implication that the procedure has the same patient as it&apos;s subject.
  • #33 Referencesbetween resources are notby “business key”, it is *not* the patientid, it’s a REST URI!
  • #37 Very important concept, comparable with the “Aggregate” notion of Domain Driven Design, for which many useful implementation strategies have been documented on the internet.
  • #38 Resource Id’s (=URLs) are infrastructural id’s, they differ from “business” identifier.Many Resources also have business identifiers, they are explicitly modeled, like Patient.identifier (even more than one identifier possible!)Business identifiers are completely separate from technical resource id’s
  • #39 This is not only the URL you use to retrieve the resource, it’s also its id.All URL’s in FHIR are case-sensitive (and so is the id)It is *metadata*, you won’t find this in the Resource’s definition
  • #42 * Content is the same
  • #43 Richardson’s REST Maturity Model. We’re at 2.5. Fielding says: “You are not REST”, so we are “RESTful”
  • #45 You can retrieve any patient using a GET on the patient’s id, which is just an url on the server: /fhir/patient/&lt;id&gt;We have our own MIME-type: “text/xml+fhir”Note that FHIR always uses UTF-8. Since this is not the default for HTTP, the server explicitly mentions thisBut should mean the xml encoding mentions “utf-8” and that the payload is really encoded in utf-8There can be a Byte Order Mark, but hopefully your framework handles all that ;-)The response returns a Content-Location header with a version-specific location….see next slide
  • #46 This is not only the URL you use to retrieve the resource, it’s also its id.Slide repeated from Resources, with addition of version specific information.All URL’s in FHIR are case-sensitive (and so is the id)
  • #47 You can retrieve any patient using a GET on the patient’s id, which is just an url on the server: /fhir/Patient/&lt;id&gt;We have our own MIME-type: “application/xml+fhir” and “application/json+fhir”
  • #49 All but tags have been seen in previous slides
  • #50 Just a quick look at tags, so the term had been mentionedThis topic needs to be worked out for the 2 day course
  • #56 Only the Resources are user-definable, other types are “built-in”Derived primitives are patterns -&gt; validation consists of regexp matchingConstrained types are defined using invariants (OCL, Xpath, prose) -&gt; validation using schematron, codeNarrative and Extension are both ONLY used in ResourcesResources can use both (derived) primitives and composite datatypes in its definitionsInfrastructural types need special handling, not general-purpose types
  • #57 No floats or doubles – either integer or a full decimal value!Difference between instant and (partial) date/timesAttention to timezones
  • #58 TODO: Search on timestamps (lower, upper bound), converting to zulu, user-timezone, sorting of times etc.* Old-school types built on classis logic and math from the Greek, we have new stuff too…types based on urls!
  • #59 The content of a primitive is not rendered in XML as a text node but as an attributeNotice how the “system” of a code is now a uri, so unlike in v3 an OID is now ALSO a uri (urn:oid:1.2.3.4.5)
  • #61 Examples is from http://www.hl7.org/implement/standards/fhir/observation.htmBindings can be Incomplete (HL7 defines some codes for it, but you can add your own), Fixed (HL7 defines the only codes that are allowed) and Example (no specific codes defined, but some are given to give you an idea of what goes in the element)
  • #62 Examples is from http://www.hl7.org/implement/standards/fhir/observation.htmBindings can be Incomplete (HL7 defines some codes for it, but you can add your own), Fixed (HL7 defines the only codes that are allowed) and Example (no specific codes defined, but some are given to give you an idea of what goes in the element)
  • #63 Bindings use ValueSets to define what codes are allowed.Patient.administrativeGender has a binding using the valueset “http://hl7.org/fhir/vs/administrative-gender”This valueset includes codes from two code systems http://hl7.org/fhir/v3/AdministrativeGender and http://hl7.org/fhir/v3/NullFlavorSo yes, FHIR reused code systems from v3 (and v2), and has some defined specifically for FHIR.
  • #64 The element “identifier” is of type HumanId, which in its turn has an element “identifier” of type “Identifier”.The element “telecom” repeats, there is no notion of a “list” in Xml.This nested structure has some consequences for when you are mapping to a “flat” table/row structure….Empty elements are left out
  • #65 * value[x] means: An element with a name that starts with “value”. The [x] is replaced by the (capitalized) name of the actual datatype
  • #66 There are references that can reference more than one type of resource! In this example: Resource(Patient | Group | Device)The reference has a “type” element to indicate the kind of Resource that is referencedReferences may be: Relative (on the same server), absolute URL (somewhere external) and internal (not treated here)
  • #67 Only the Resources are user-definable, other types are “built-in”Derived primitives are patterns -&gt; validation consists of regexp matchingConstrained types are defined using invariants (OCL, Xpath, prose) -&gt; validation using schematron, codeNarrative and Extension are both ONLY used in ResourcesResources can use both (derived) primitives and composite datatypes in its definitionsInfrastructural types need special handling, not general-purpose types
  • #68 Reallyany FHIR element (Resource, Datatype, Primitive) canbeextended. Just nest an &lt;extension&gt; element under the thingyou want toextendYou should be able to go to the formal definition endpoint and get the definition of the extension.Note: birth order is already provided for in FHIR through the multipleBirthInteger
  • #70 Only the Resources are user-definable, other types are “built-in”Derived primitives are patterns -&gt; validation consists of regexp matchingConstrained types are defined using invariants (OCL, Xpath, prose) -&gt; validation using schematron, codeNarrative and Extension are both ONLY used in ResourcesResources can use both (derived) primitives and composite datatypes in its definitionsInfrastructural types need special handling, not general-purpose types
  • #71 “Every resource SHALL include a human readable narrative”Narrative status values: generated, extensions, additional, (and empty)Generated: The contents of the narrative are entirely generated from the structured data in the resource.Extensions: The contents of the narrative are entirely generated from the structured data in the resource and some of the content is generated from extensions.Additional:The contents of the narrative contain additional information not found in the structured data.Empty: the contents of the narrative are some equivalent of &quot;No human-readable text provided for this resource&quot;.