FHIR Tutorial - Morning
-
Upload
ewout-kramer -
Category
Technology
-
view
1.043 -
download
2
description
Transcript of FHIR Tutorial - Morning
![Page 1: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/1.jpg)
© 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:
Updated for
FHIR DSTU!
![Page 2: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/2.jpg)
© 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
![Page 3: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/3.jpg)
© 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?
![Page 4: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/4.jpg)
© 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
![Page 5: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/5.jpg)
© 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
![Page 6: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/6.jpg)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Fast Relative – No technology can make integration as fast as we’d like
HealthcareInteroperabilityThat’s why we’re here
ResourcesBuilding blocks – more on these to follow
![Page 7: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/7.jpg)
© 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
![Page 8: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/8.jpg)
© 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
![Page 9: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/9.jpg)
© 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
![Page 10: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/10.jpg)
© 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 StreamReadIFhirReader r = new XmlFhirReader
// JsonTextReader jr = new JsonTe// new StreamRead// IFhirReader r = new JsonFhirRe
ErrorList errors = new ErrorList(LabReport rep = (LabReport)ResourAssert.IsTrue(errors.Count() == 0
![Page 11: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/11.jpg)
© 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?
![Page 12: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/12.jpg)
© 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
![Page 13: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/13.jpg)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
13
Cover all usecases - (n)ever
HL7v3 RIM
Generic
HL7 CDA
C-CCD
openEHR RM
HL7v2
IHE PDQ
FHIR
Specific
openEHR Archetypes
openEHR Templates
HL7v3 CMETS
![Page 14: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/14.jpg)
© 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
![Page 15: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/15.jpg)
© 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
![Page 16: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/16.jpg)
© 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
![Page 17: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/17.jpg)
© 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
![Page 18: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/18.jpg)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Message
Document
REST
HTTP/1.1 200 OKContent-Type: application/json;charset=utf-8Content-Length: 627Content-Location: /fhir/person/@1/history/@1Last-Modified: Tue, 29 May 2012 23:45:32 GMTETag: "1“
"Person":{"id":{"value":"1"},"identifier":[{"type":{"code":"ssn","system":"http://hl7.org/fhir/sid
Transport
![Page 19: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/19.jpg)
© 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
http://...
![Page 20: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/20.jpg)
© 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
![Page 21: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/21.jpg)
© 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
![Page 22: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/22.jpg)
© 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
![Page 23: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/23.jpg)
© 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
![Page 24: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/24.jpg)
© 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,
Encounter, Organization, Clinical Concepts
AllergyIntolerance, Questionnaire, Observation
Infrastructure Document, Message,
Profile, Conformance
Non-examples
Gender Too small
Blood Pressure Too specific
Pregnancy Too broad
Electronic Health Record Too big
![Page 25: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/25.jpg)
© 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
![Page 26: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/26.jpg)
© 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)
![Page 27: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/27.jpg)
© 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
![Page 28: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/28.jpg)
© 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….
![Page 29: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/29.jpg)
© 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
![Page 30: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/30.jpg)
© 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)
![Page 31: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/31.jpg)
© 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
![Page 32: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/32.jpg)
© 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…”
Note: No referential integrity – references are just URL’s
DiagnosticReport
![Page 33: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/33.jpg)
© 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
![Page 34: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/34.jpg)
© 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
![Page 35: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/35.jpg)
© 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…
![Page 36: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/36.jpg)
© 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 storageof data, there must be a scope for a transaction that changes data and a way of maintaining the consistency of the data”
![Page 37: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/37.jpg)
© 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
![Page 38: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/38.jpg)
© 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
![Page 39: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/39.jpg)
© 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-1972Amsterdam
Resource metadata
Metadata
Resource Identitieshttp://fhir.hl7.org/Patient/23E455A3Bhttp://fhir.hl7.org/Patient/23E455A3B/_history/4
Last updated2013-12-23T23:33:01+01:00
http://hl7.org/fhir/tag/profilehttp://hl7.org/fhir/Profile/us-core
http://hl7.org/fhir/taghttp://example.org/fhir/Status#Test
![Page 40: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/40.jpg)
© 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 INTERFACEHow FHIR uses RESTful principles to communicate Resources
![Page 41: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/41.jpg)
© 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
![Page 42: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/42.jpg)
© 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
![Page 43: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/43.jpg)
© 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
![Page 44: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/44.jpg)
© 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 OKContent-Type: application/xml+fhir;charset=utf-8Content-Length: 787Content-Location: http://spark.furore.com/fhir/Patient/1/_history/12Last-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
![Page 45: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/45.jpg)
© 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
![Page 46: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/46.jpg)
© 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 OKContent-Type: application/json+fhir;charset=utf-8Content-Length: 787
GET /fhir/Patient/1 HTTP/1.1
Accept: application/json+fhir
HTTP/1.1 200 OKContent-Type: application/json+fhir;charset=utf-8Content-Length: 787
![Page 47: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/47.jpg)
© 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-1972Amsterdam
Remember metadata?
Metadata
Resource Identitieshttp://fhir.hl7.org/Patient/23E455A3Bhttp://fhir.hl7.org/Patient/23E455A3B/_history/4
Last updated2013-12-23T23:33:01+01:00
http://hl7.org/fhir/tag/profilehttp://hl7.org/fhir/Profile/us-core
http://hl7.org/fhir/taghttp://example.org/fhir/Status#Test
![Page 48: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/48.jpg)
© 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
![Page 49: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/49.jpg)
© 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 OKContent-Location: http://server.com/fhir/Patient/1/_history/12Last-Modified: Tue, 29 May 2012 23:45:32 GMTCategory: 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/profileA profile tag - a claim that the Resource conforms to the profile identified in the term
http://hl7.org/fhir/tag/security A security label
![Page 50: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/50.jpg)
© 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….
![Page 51: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/51.jpg)
© 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}
![Page 52: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/52.jpg)
© 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)
![Page 53: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/53.jpg)
© 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
![Page 54: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/54.jpg)
© 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
![Page 55: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/55.jpg)
© 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
ExtensionsPrimitives(integer, boolean, string, instant)
Derived Primitives
(oid, uuid, code, id)
CompositeDatatypes(HumanName, Quantity, Period,Address, Identifier )
Constrained Types
(Quantity: Distance, Count, Duration, Money)
use
use
use
![Page 56: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/56.jpg)
© 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 falseinteger 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:dateTimeAn instant in time - known at least to the second and always includes a timezone.
uri xs:anyURI A Uniform Resource Identifier Reference.
dateunion 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.
![Page 57: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/57.jpg)
© 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
![Page 58: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/58.jpg)
© 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
![Page 59: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/59.jpg)
© 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
![Page 60: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/60.jpg)
© 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
![Page 61: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/61.jpg)
© 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
![Page 62: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/62.jpg)
© 2012 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
![Page 63: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/63.jpg)
© 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
![Page 64: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/64.jpg)
© 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
![Page 65: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/65.jpg)
© 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
![Page 66: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/66.jpg)
© 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
![Page 67: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/67.jpg)
© 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
![Page 68: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/68.jpg)
© 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
![Page 69: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/69.jpg)
© 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
![Page 70: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/70.jpg)
© 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
![Page 71: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/71.jpg)
© 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)
![Page 72: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/72.jpg)
© 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
![Page 73: FHIR Tutorial - Morning](https://reader033.fdocuments.us/reader033/viewer/2022061214/549a1167b4795971768b46aa/html5/thumbnails/73.jpg)
© 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