Developers
Ewout Kramer
January 17, 2014
http://www.slideshare.net/ewoutkramer/hl7-fhir-for-developers
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
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?
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
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Contents of this tutorial
Deconstructing FHIR
FHIR RESTful service interface
Beyond REST
Searching
FHIR on the Wire
Distribution for developers
Building a FHIR server
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 perspective?
v3 App
FHIR
v2
FHIR
PHR
Broker
Comm.
Interface
FHIR
DB
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Looking at FHIR data modeling concepts from a software
engineering perspective
DECONSTRUCTING 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.
Resources (review!)
Resources are:
Small logically discrete units of exchange
Defined behaviour and meaning
Known identity / location
Smallest unit of transaction
of interest to healthcare
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 versus
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
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Containment
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.
Resource Reference
Refers to
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.
Resource Reference
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.
Network
subject
performer
organization
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.
Resource Aggregate
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
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.
A Resources identity
In fact: an URL
resource type
http://server.org/fhir/Patient/1
endpoint identifier
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.
Resource metadata
http://hl7.org/fhir/tag
http://example.org/fhir/Status#Test
http://hl7.org/fhir/tag/profile
http://hl7.org/fhir/Profile/us-core
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 FHIR Elements
Composite Constrained
Datatypes Types
(HumanName, (Quantity:
Quantity, Period, Distance, Count,
Address, Identifier ) Duration, Money)
use
Primitives Derived
(integer, boolean,
string, instant) Primitives
(oid, uuid,
code, id)
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.
Start at the bottom:
Primitives
boolean xs:boolean Values can be either true or false
integer xs:int A signed 32-bit integer
A rational number. A true decimal, with
decimal xs:decimal
inbuilt precision (e.g. Java BigDecimal)
base64Binary xs:base64Binary A stream of bytes, base64 encoded
An instant in time - known at least to the
instant xs:dateTime second and always includes a
timezone.
string xs:string A sequence of Unicode characters.
uri xs:anyURI A Uniform Resource Identifier Reference.
union of xs:date,
A date, or partial date as used in
date xs:gYearMonth,
human communication. No time zone.
xs:gYear
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
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.
Derived primitives
Based on string:
code (string of characters, may contain single
spaces) - 4548-4, active, not known
id ([a-z0-9\-\.]{1,36})
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.
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
http://www.hl7.org/implement/standards/fhir/datatypes.htm
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.
Choice properties
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.
Coded types
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.
Coded types
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.
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.
Goto Some interesting valuesets to look at
them
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.
Publication meta-
data
Concepts from 1 or
more existing
systems
Additional concepts
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.
Level up: resources
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.
References
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.
Extending a name
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.
Complex extensions
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.
Narrative
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.
The FHIR datamodel
(simplified!)
Composite Constrained
Datatypes Types
Narrative (HumanName, (Quantity:
Quantity, Period, Distance, Count,
Address, Identifier ) Duration, Money)
Elements use
Resources
use
Extensions
Extensions
use
Primitives Derived
(integer, boolean,
string, instant) Primitives
(oid, uuid,
code, id)
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.
How resources are made into classes in the supplied reference
implementations
RESOURCES IN CODE
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Reference
implementations
- Contents
- Model classes generated from the spec
- Parsers Parsers generated from the spec
- Serializers Serializers generated from the spec
- FhirClient
- Validation (currently Java only)
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.
Object Model
[FhirResource("DiagnosticReport")]
public partial class DiagnosticReport : Resource
{
public Code<ObservationStatus> Status {}
public
List<DiagnosticReportRequestDetailComponent>
RequestDetail { }
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.
Parsing/Serializing using
C#
ErrorList errors = new ErrorList();
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 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
REST Documents
Messages Services
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.
REST?
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.
Just a quick GET
HTTP/1.1 200 OK
Content-Type: application/xml+fhir;charset=utf-8
Content-Length: 787
Content-Location:
http://fhir.furore.com/fhir/Patient/1/_history/1
Last-Modified: Tue, 29 May 2012 23:45:32 GMT
UTF-8
encoded
<?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>
See the BOM?
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.
A Resources REST
identity
In fact: an URL
resource type
http://server.org/fhir/Patient/1
endpoint identifier
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.
One more look at the
header
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://fhir.furore.com/fhir/Patient/1/_history/12
Last-Modified: Tue, 29 May 2012 23:45:32 GMT
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.
For a specific version
base path
http://server.org/fhir/ (continued)
resource type
Patient/1/_history/4
identifier version id
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.
Support for versions
/server.org/fhir/Patient/33/_history/12
33, v12 2012-12-04
33, v13 2012-12-05 /server.org/fhir/Patient/33/_history/13
/server.org/fhir/Patient/33
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.
REST representations
HTTP/1.1 200 OK
Content-Type: application/json+fhir;charset=utf-8
Content-Length: 787
HTTP/1.1 200 OK
Content-Type: application/json+fhir;charset=utf-8
Content-Length: 787
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.
Question
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.
Remember
conformance?
http://www.hl7.org/fhir/conformance.htm
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.
Tag metadata
HTTP/1.1 200 OK
Content-Location: http://sever.om/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"
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.
REST in the spec
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.
To create 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.
To update a resource
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.
Using PUT to create
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.
Version-aware updates
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.
Whats a deleted
Resource?
Trying read operations will return in a 410
(Gone) result in stead of 404 (Not Found)
The resource will not be returned by the
search operation.
You can undelete by doing an update with
fresh content
Just a marker in a resources history
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.
Version history -
deletions
/server.org/fhir/Patient/33/_history/12
33, v12 2012-12-04
/server.org/fhir/Patient/33/_history/13
33, v13 2012-12-05
/server.org/fhir/Patient/33/_history/14
33, v14 2012-12-08
/server.org/fhir/Patient/33/_history/15
33, v15 2012-12-09
/server.org/fhir/Patient/33/_history/16
33, v16 2012-12-10
DELETION
/server.org/fhir/Patient/33
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.
Version history - revival
/server.org/fhir/Patient/33/_history/13
33, v13 2012-12-05
/server.org/fhir/Patient/33/_history/14
33, v14 2012-12-08
/server.org/fhir/Patient/33/_history/15
33, v15 2012-12-09
/server.org/fhir/Patient/33/_history/16
33, v16 2012-12-10
/server.org/fhir/Patient/33/_history/17
33, v17 2012-12-11
/server.org/fhir/Patient/33
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.
The Binary Endpoint
http://someserver/fhir/Binary/
Accepts any kind of content
Stores the content as is, along with the
content type provided by the HTTP headers.
Acts just like the normal Resource endpoints
(but there is no search)
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.
Useful for Attachments
/Binary/23344
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.
Using FHIR Client in C#
pat.Name.Add(HumanName.ForFamily("Kramer")
.WithGiven("Ewout"));
client.Update<Patient>(patEntry);
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.
How FHIR uses Atom to communicate sets of resources
BUNDLES
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Communicating lists
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.
Bundles
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.
New reports in the mail
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.
An example Bundle
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.
Resource Entry
Resource id
Last modified
Tags
Version-specific id
Resource content
Human-readable form,
just like Resource.text
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.
Example: Keeping in
sync
History of all resources on server
http://server.org/fhir/_history
Same
id!
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.
Atom in JSON
75
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Json Atom - Example
{
"title": "Search result",
"updated": "2012-09-20T12:04:45Z",
"id": "urn:uuid:50ea3e5e-b6a7-4f55-956c-caef491bbc08",
"link": [ { "rel": "self", "href": "http://server.org/fhir/Patient?format=json" } ],
"entry": [
{ "title": "Resource of type Patient, with id = 1 and version = 1",
"link": [ { "rel": "self", "href": "http://fhir.furore.com/fhir/Patient/1/_history/1" } ],
"id": "http://fhir.furore.com/fhir/Patient/1",
"updated": "2012-05-29T23:45:32Z",
"published": "2012-09-20T12:04:47Z",
"author": [ { "name": "Grahame Grieve / HL7 publishing committee" } ],
"content":
{ "Patient": { } }
}
]
}
76
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Bundles in C#
result.Entries.Add(new ResourceEntry<Patient>()
{ LastUpdated=DateTimeOffset.Now, Content = new Patient() });
result.Entries.Add(new DeletedEntry()
{ Id = new Uri("http://..."), When = DateTime.Now });
78
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Bundles in Java
AtomFeed feed = new AtomFeed();
feed.setTitle("Demo bundle");
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
And finally, the last REST operation (for now):
SEARCH FUNCTIONALITY
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Getting all patients
http://server.org/fhir/Patient
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Search (patient)
Each resource has a set of standard
search operations, so not every element
can be searched!:
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Combining parameters
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Search (patient)
Parameter
Type
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Token
85
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Ok I get itor not?
86
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Chained searches
87
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
2 queries in 1
http://server.com/fhir/observation/search?
subject.name=jim
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
More optimalizations
Say we do:
http://fhir.com/fhir/Observation?date=2014-01-20
We get back: a Bundle with 0..* Observations
Now, usually, wouldnt we want the Patient
information too? => Need to do N queries
for the Observations subject
Quicker:
?_include=Observation.subject
Returns both Observations + Patients
89
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Validation
90
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Tagging a Resource
Patient
http://hl7.org/fhir/tag/security
MRN 22234 http://hl7.org/fhir/v3/ActCode#TABOO
Ewout Kramer
30-11-1972
Amsterdam
http://hl7.org/fhir/tag
http://example.org/fhir/Status#Test
http://hl7.org/fhir/tag/profile
http://hl7.org/fhir/Profile/us-core a claim that the Resource
conforms to the profile
identified in the term
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
(Distributed) validation
Apps server
Profile X
Profile Y
Profile Y
Validate
92
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Validation
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Operation Outcome
94
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 FHIR supports messages and documents
BEYOND 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 Document resource
96
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Documents are
bundles
Composition Resource <feed>
Metadata Attester <entry>
Section <Composition />
Section </entry>
<entry>
<Observation />
</entry>
Observation Resource <entry>
<Device />
Device Resource </entry>
<entry>
<Prescription />
Prescription Resource </entry>
<entry>
<Patient />
Patient Resource </entry>
</feed>
97
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 as Document
This
Bundle is a
Document
98
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Communicating
documents
You can also drop your document using
FHIR on
http://server.org/fhir/Mailbox
No storage or disassembly is implied, your
just posting a document in its entirety.
Servers can implement specific functionality
as required between trading partners when
receiving such a document.
99
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Communicating
documents
You can store your document using
http://server.org/fhir/Document
Storage, NO disassembly is implied,
document (and signature) stays intact
Search is supported (you search on its
Message header Composition)
NEW!
100
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
MessageHeader
Resource
101
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Messages are bundles
Message Resource <feed>
source destination <entry>
<MessageHeader />
event </entry>
<entry>
<Observation />
Observation Resource </entry>
<entry>
<Patient />
Device Resource </entry>
<entry>
<Device />
</entry>
</feed>
Patient Resource
102
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 as Document
This
Bundle is a
Document
103
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Sending messages
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
INSIDE THE FHIR
DISTRIBUTION
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Browsing the site
REST API
Data Types
XML & JSON
Codes / Terminologies
Resource List
Stack Overflow
Public Test servers
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 FHIR distribution
Under Implementation-Support-Downloads:
The XSD schemas / schematrons
The Java / C# / Delphi zips (model, serializers,
parsers, etc, both code & binary)
All xml + json examples
Full spec for offline reading (always have your
FHIR with you)
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 FHIR SVN
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Source of FHIR
110
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Source of FHIR
111
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Publication process
.INI
Publication tool
(org.hl7.fhir.tools.jar)
Website Examples Resource Java, C#,
UML Delphi
Validation
Schemas DictXml Resource eCoreDefinitions.xml
profiles
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Generator writers!
113
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 in practice
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Some possible uses
v3 App
FHIR
v2
FHIR
PHR
Broker
Comm.
Interface
FHIR
DB
115
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Repository model
FHIR FHIR
FHIR FHIR 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.
Overview of a server
117
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
From wire to store
Storage NoSql
DBMS DBMS
118
(Xml/Json)
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Briefest intro to JSON
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.
Xml and Json in FHIR
code.coding is 0..*
121
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Xml and Json in FHIR
122
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Handling both
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Document-oriented store
db.posts.save( post );
124
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
No (sql) transactions
126
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Batch: needs transactions
Transaction
The transaction interaction submits a set of resources to
be updated, created or deleted on the server. This
interaction allows multiple resources to be updated/created
in a single transaction. The interaction is performed by an
HTTP POST command as shown:
127
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Storing resources
FHIR POCO Model
Mongo
Atom Entry
Patient Binary Observation (stored json)
Resource
Amazon S3 Metadata
Original
Binary (json or xml)
128
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
RDBMS: BLOB + Index
Type VersionIdHigh
Patient 2 Need to index
Lab 3 only latest
version!
129
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Both implementations use a
separately maintained index for
search?
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Predictable search
Each resource has a fixed set of search parameters:
Searched
element
Parameter
Type
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Partial/combined match
The search parameter description shows that the match certainly isnt
always exact, and can even combine the contents of several elements:
133
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Prepare your data!
patient/search?
name=johan&
name=grafin&
telecom=5552004
134
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 END IS NEAR
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Balloting plans
136
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Next Steps for you
fhir@lists.hl7.org
#FHIR
Implementors Skype Channel
EU RIMBAA meetings (november)
StackOverflow: hl7 fhir tag
137
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
QUESTIONS?
2012 HL7 International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.