Weitere ähnliche Inhalte Ähnlich wie Authoring profiles by Michel Rutten (14) Kürzlich hochgeladen (20) Authoring profiles by Michel Rutten1. Authoring Profiles
Michel Rutten
FHIR Developer Days
November 25, 2014
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
2. Who am I?
Name: Michel Rutten
Company: Furore
Background:
Professional software developer since 1998
Microsoft .NET; Healthcare industries
Technical Specialist at Furore since May 2014
Member of the Furore FHIR development team
Lead developer of Forge
2
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
3. TOPICS
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
4. Presentation Topics
Introduction
Resources
Profiles
Representations
Authoring Tools
Authoring Profiles
Metadata
Structures
Bindings
Constraints
Extensions
Slicing
4
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
5. Introducing
PROFILES
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
6. The need for profiles
Many different contexts in healthcare, but a
single set of Resources
Need to be able to describe restrictions
based on use and context
Allow for these usage statements to:
Authored in a structured manner
Published in a repository
Used as the basis for validation, code, report and UI
generation.
17
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
7. Use of Profiles
Publish to
repository
Profile
Report
Implementation
guide
POCO
Validate
Resource
Conformance
statement
18
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
8. What is a profile?
Special resource
Statement of use of one or more FHIR
resources
Provides additional rules about how a type of
resource is utilized in a particular context of use, or
for a particular use case
Specify restrictions / constraints on resources
Specify extensions on resources
19
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
9. Profiling a resource
Resource
Definition Patient
Profiled
Resource
My
Patient
20
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
10. Profiling a resource
21
“Must use only the Dutch national patient identifier”
“Need to register an administrative race code for a Patient in the
US”
“Patient Discharge documents must at least contain section
“Discharge Medication” and section “Discharge Diagnosis”
“In our Patient registration system, we use these maritalStatus
codes beyond those provided by HL7…”
“Our patient registration system, only supports having one single
name per Patient”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
11. Profiling a resource
22
Demand that the identifier uses your
national patient identifier
Limit names to just 1 (instead of 0..*)
Limit maritalStatus to another set of
codes that extends the one from
HL7 international
Add an extension to support
“RaceCode”
Note: hardly any
mandatory elements in
the core spec!
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
12. Using profiles
Formulate what exchanging partners must
adhere to
Server & client may publish their
conformance to profile
When communicating a resource, a resource
can indicate the profiles it conforms to.
Receiving side may verify conformance
23
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
13. Tagging a resource
Patient
• MRN 31415
• “Michel Rutten”
• 20-01-1973
• Sittard
• “I’m a Patient conforming to the Dutch
Profile”
See http://hl7.nl/Profiles/patient-nl
24
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
14. Profile –a “normal”
resource
25 …computable!
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
15. Introducing profiles
REPRESENTATIONS
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
16. Formats
27
XML
Namespace: http://hl7.org/fhir
Also includes XHTML
JSON
No namespaces…
JSON XPath Navigator
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
17. Differential Structure
28
Describes only modified elements
Different from resource definition
Does not describe default elements
Identical to resource definition
Targeted at profile authors
Concise XML
Focus on customizations
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
18. Example: Lipid
29
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
19. Snapshot
30
Contains all resource elements
Modified elements
Default elements
Targeted at profile tooling
Easier to process programmatically
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
20. Example: Lipid
31
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
21. Expansion
32
FHIR API supports the expansion of
differential profiles
Tooling
Open: Expand differential profile
Save: Generate differential profile
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
22. Profile Authoring Tools
SPREADSHEET
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
23. Profile spreadsheet
HL7 Wiki
http://wiki.hl7.org/index.php?title=FHIR_Spreadsheet_Profile_Authoring
Tab page ↔ resource
Row ↔ resource element
Column ↔ element property
34
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
24. Example: Lipid
35
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
25. Profile spreadsheet
Supports differential structures
Only include rows for modified elements
Supports snapshots
May include default elements by copying rows
form resource definition sheet
36
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
26. Profile Authoring Tools
FORGE
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
27. Forge
FHIR Profile Editor
http://fhir.furore.com/forge
Windows Desktop Application
Supports online & offline use
Load from / save to FHIR server
Load from / save to disk
38
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
28. Forge
Implementation based on FHIR API
Resource definitions
Deserialize XML to POCO
Serialize POCO to XML
Profile error validation
Supports differential and snapshot structures
Open differential/snapshot profile
Generates compressed XML
39
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
29. Work In Progress
Current release supports most of DSTU 1
Some advanced features are not yet
supported, e.g.
Type slicing (value[x])
Search parameters
Some bugs...
40
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
30. Example: Lipid
41
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
31. Authoring Profiles
STEP BY STEP
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
32. Running Example
“Lipid Profile” example from spec
http://www.hl7.org/implement/standards/fhir/diagno
sticreport-profile-lipids.html
DiagnosticReport containing 4 results:
1x Cholesterol
1x Triglyceride
1x HDL Cholesterol
0/1x LDL Cholesterol
Package it up in a message
44
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
33. Authoring Profiles
METADATA
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
34. Identification
REST Id on server
http://spark.furore.com/fhir/profile/lipid.v1
Server assigned
Name
“Lipid Profile”
Human readable
Author assigned
46
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
35. Identification
Identifier
Globally unique
Author assigned
UUID: 15046b9c-2da0-4b80-82ef-c6af6fcfd2bf
OID: 2.16.840.1.113883.10.20.2.1
URN
urn:openEHR.org:EHR-ACTION.medication.v1
http://hl7.org/fhir/Profiles/iso-21090-2011
47
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
36. Versioning
We used semantic versioning
Uses “<major>.<minor>.<patch>”
See semver.org
Major version number is increased on
breaking changes
Major version number is part of author-assigned
identifier AND REST url
Both versions may co-exist on server, they
have different URLs and names
48
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
37. Versioning example
URL Id v
http://fhir.nl/Profile/patient.v1 urn:fhir.nl:profile:patient:v1 1.0.0 Original
version
http://fhir.nl/Profile/patient.v1 urn:fhir.nl:profile:patient:v1 1.0.1 Typo
Clarification
Correction
Bugfix
http://fhir.nl/Profile/patient.v1 urn:fhir.nl:profile:patient:v1 1.1.0 Non-breaking
change
Addition
http://fhir.nl/Profile/patient.v2 urn:fhir.nl:profile:patient:v2 2.0.0 Breaking
change
49
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
38. Profile Metadata
Publisher
• Organization or individual
responsible for publishing
• Should be populated
• e.g. “FHIR Project Team“
Telecom
• One or more contact points
of the publisher
• Telephone, email, website
etc.
Description
• Longer description of the
contents of the profile
Code
• One or more coded
descriptions to help with
finding the profile
• e.g. LOINC 58239-5 (lipid)
Status
• Draft, Active, Retired
• Experimental Y/N
Requirements
• Scope & Usage
• The “need” or “why” of the
profile
Date
• Of publication
• YYY-MM-DD
• e.g. “2013-07-07"
50
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
39. Example
51
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
40. Authoring Profiles
STRUCTURES
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
41. What’s in a profile?
53
Metadata
Extensions
Constrained
Resources
& Datatypes
Profile
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
42. Structures
54
Profiles contain “Structures”
Set of constraints on (nested) elements of a
Resource or Datatype
“Subclass” of a Resource, with specific limits
on its elements
Cardinality
Value domains
Invariants
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
43. Example
55
“Cholesterol observation” is an Observation :
That has a fixed LOINC code 35200-5 (Cholesterol) as its
name
Has a quantity as value that’s expressed in mmol/L (a
UCUM unit) (without a ‘comparator’) OR ELSE there’s a
comment
An interpretation limited to LL,L,N,H,HH
A “recommended” high reference range of 4.5 (no low)
mmol/L, independent of age (no age)
Is an independent observation (no related)
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
44. Cardinality
Number of elements in a set
0 - None
1 – Single element
N – N elements
* – Many elements
Multiplicity
Minimum cardinality
Maximum cardinality
56
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
45. Cardinality
Minimum Maximum Description
0 0 Prohibited / removed element
0 1 Optional single element
0 * Zero or more elements
1 1 Required element
1 * One or more elements
2 3 Specific bounds
57
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
46. Constrain Cardinality
58
You can only further restrict the cardinality of
resource elements
Increase minimum cardinality
Decrease maximum cardinality
An element that is mandatory in the resource
definition cannot be constrained as optional
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
47. Limit value domains
59
AddressNL
OrganizationNL
=“true”
Only allow “active” Patients
If deceased is given, it must be
a dateTime, not a boolean
Use a profiled datatype (from
this or other profile)
Only allow reference to a
profiled resource
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
48. Contextualize Narrative
60
Override the base spec’s descriptions by
adding context specific narrative:
short : string 1..1
formal : string 1..1
comments : string 0..1
requirements : string 0..1
synonym : string 0..*
example[x] : 0..1 (example value!)
mappings : 0..* (more specific mappings)
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
49. Example: spreadsheet
61
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
50. Example: Forge
62
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
51. Demo: Forge
63
0..1
“if no value…”
= ‘ok’
1..1
1..1
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
52. Must support?
64
Authors: SHALL be capable of providing a
value for the element and resource
Consumers: SHALL be capable of extracting
and doing something useful with the data
element.
"Something useful" is context dependent.
The Profile SHALL describe what it means
for applications to “support” the element
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
53. Reusable constraints
65
We have multiple components within the
“Lipid Profile” with Quantity
All with the same constraints
Units are mmol/L
in UCUM (http://unitsofmeasure.org)
no comparator
Let us first make a reusable “lipid quantity”
constraint on the Quantity datatype!
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
54. Demo: Lipid Quantity
66
Element Property Value
Quantity Short Quantity as used in lipid measurements
Quantity Formal Quantity as used in lipid measurements
Quantity Comments Lipid measurements are expressed in
mmol/L
Quantity.units Fixed value mmol/L
Quantity.system Fixed value http://unitsofmeasure.org/
Quantity.code Fixed value mmol/L
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
55. Demo: Lipid Quantity
67
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
56. Authoring Profiles
BINDINGS
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
57. Coded types
69
In a Profile, we may want to limit the codes that can possibly be used in
coded elements in the Resources
Codes are defined
in code systems
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
58. CodeSystem vs.
ValueSet
70
“Code System”
“ValueSet”
“Dante’s deadly sins”
Pride
Envy
Wrath
Sloth
Avarice
Gluttony
Lust
Takes concepts from…
Defintion of
terms
An enumeration
of terms
Example: SNOMED-CT Example: “Childhood diseases”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
59. Identification of
CodeSystems
If you refer to CodeSystems, you use a URL
(instead of OID in v2 and v3):
http://snomed.info/sct
http://loinc.org
http://hl7.org/fhir/sid/icd-10
We have introduced them for v2 and v3:
http://hl7.org/fhir/v2/0078
http://hl7.org/fhir/v3/ActClass
71
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
60. ValueSet
Has metadata
much like Profile: identifier, version, name, etc
Is built by inclusion of terms from
CodeSystems
Can exclude specific codes from other
valuesets
Can import codes from other ValueSets
72
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
61. ValueSet
73
In/exclude concepts
Metadata
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
62. ValueSet
But it can also enumerate (and so indirectly
define) all concepts for a new codesystem:
A ValueSet has metadata (much like Profile:
identifier, version, name, etc)
A ValueSet is built by defining terms from
and for a new CodeSystem
These new concepts have a display label
and a definition
…and may be hierarchically organized 74
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
63. ValueSet
75
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
64. ValueSet: Gender
76
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
65. Bindings
When used in a Resource, the modelers
include Bindings
Bindings specify which codes can be used
77
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
66. Example: Forge
78
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
67. Conformance
79
If implementers of your profile provide a
different code than you have in your profile….
isExtensible=N isExtensible=Y
Required SHALL Validation error
Non-conformant
Additional codes
allowed
Preferred SHOULD Validation error
Discouraged
Supplemental
codes likely
Alternatives
allowed
Example MAY Just a suggestion, no preference
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
68. Authoring Profiles
FORMAL CONSTRAINTS
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
69. Formal constraints
Examples:
“If a Cholesterol value result is not available, use
the comments field”
“A patient’s birthdate must be on or before today’s
date”
May concern a single element, or cover
multiple elements.
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
70. Formal constraints
Uses free text (human) + xpath (executable)
Constraints should be declared on lowest
element in the hierarchy that is common to
all nodes referenced by the constraint.
Identified by (local) ‘Key’
Involved elements refer to that id
Specify severity
“error” or “warning”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
71. Context of a constraint
83
“If a Cholesterol value result is not available, use the comments field”
• This constraint is on the
elements “valueQuantity” and
“comments”
• We would have to formulate this
constraint on the Observation,
this is the context of the
constraint
• We assign the constraint a “key”
value that’s unique within the
Observations’ constraints
• We refer from both “value[x]”
and “comments” to this “key”.
This means: if my value
changes -> revalidate the
constraint
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
72. Example: Forge
84
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
73. Example: Forge
85
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
74. Example: Forge
86
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
75. Authoring Profiles
EXTENSIONS
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
76. Extensions
Extension Definition
Global, shared
Extension Reference
Structure element
References an Extension Definition
88
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
77. Extension Context
An extension has a context type
Resource, Datatype, Extension, Mapping
And a context path
(Resource) Observation
“The observation was calculated”
(Resource) Observation.value
“The observation’s ‘value’ was calculated”
(Datatype) Quantity
“This quantity was calculated”
(any Quantity used in any resource!) 89
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
78. Extension Definition
90
Note: multiple
contexts!
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
79. Extending a name
91
Key = location of formal definition
Value = value according to definition
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
80. Calculated - Definition
92
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
81. Calculated - Use
93
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
82. Authoring Profiles
SLICING
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
83. Slicing
Slicing Group
Discriminator
Cardinality
Slice
Cardinality within the group
Additional constraints
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
84. Example: Contact
Resource definition is very generic:
Telecom
Contact { phone, fax, email, url } (0-*)
Let’s constrain; require phone & email:
Telecom (2)
Phone (1)
Email (1)
Discriminator = system
96
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
85. Slice Cardinality
97
Slice Group Cardinality Slice Cardinality
Telecom 2…2 Phone 1…1
Email 1…1
Must specify both Phone and Email
Slice Group Cardinality Slice Cardinality
Telecom 1…2 Phone 0…1
Email 0…1
Must specify Phone and/or Email
Slice Group Cardinality Slice Cardinality
Telecom 0…2 Phone 0…1
Email 0…1
Optional Phone and/or Email
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
86. Example: Contact
98
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
87. Example: Lipid
99
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
88. Example: Lipid
100
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
89. Forge
FUTURE DEVELOPMENT
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
90. Profile Validation
User friendly validation error messages
Validation error message provided by API…
Highlight invalid controls
Red border
Click on message => focus associated control
Support for XPath validation rules…
Hard-coded subset?
102
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
91. Resource Validation
Validate a resource against the profile
Generate validation report
List discrepancies
103
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
92. Value Slicing
Slice value[x] element
Slice element for each included type
Automatically generate/synchronize slices
Cf. regular slice – all slices share a common
type
Example
Schedule OR Period
104
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
93. Modifier Extensions
Extension with isModifier = True
Slicing within ModifierExtensions collection
Instead of regular Extensions collection
Issue:
If a profile is updated by clearing the isModifier
property value, then all related profile definitions
become invalid…
105
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
Hinweis der Redaktion Luckily, our building blocks – Resources – are already less "finegrained". Slightly less flexibility – but easier to compose meaningful stuff. If you need flexibility, you can add extensions.
Profiles are our building books. When just given the spec (which is still quite flexible), there's still a lot of flexibility in combining those. Profiles express what communicating partners expect to exchanging within their context and usecase. 9:25 9:25 9:25 9:25 Structured => computable!
Published => Discoverable, versionable
Report => Profile Author
POCO, Implementation Guide => Developer
Publish, Conformance, Validation => Client/Server Cf. OOP Inheritance, specialization
Note: introduce term “resource definition” Cf. OOP Inheritance, specialization
Note: introduce term “resource definition” Conformance 9:25 9:25 9:25 9:25 9:25 Tab pages: Profile Editor, XML Viewer
Left pane: profile meta properties
Center pane: structures / extensions with element tree
Right pane: properties of the selected structure / element Comments: If not available, a comment should be given This flag is never set to true by the FHIR specification itself – it is only set to true in profiles, and when the profile sets it true, it SHALL describe what it means for applications to support the element.
As an example, the panCanadian v3 profile for Patient identifies “date of death” as being “required” in our v3 message specification. That means minOccurs=0, conformance=required. Systems don’t have to send it, but they must be capable of sending, capturing and storing it. With FHIR, we’d accomplish the same thing by setting minOccurs=0 and mustSupport=true in our profile. 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/NullFlavor
So yes, FHIR reused code systems from v3 (and v2), and has some defined specifically for FHIR.
9:25 9:25 9:25 9:25