Foundation
This
page
is
part
of
the
FHIR
Specification
(v3.0.2:
STU
3).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
Continuous
Integration
Build
of
available
versions,
see
FHIR
(will
be
incorrect/inconsistent
at
times).
See
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
| Responsible Owner: FHIR Infrastructure Work Group |
|
Compartments : Patient , Practitioner , RelatedPerson |
Raw
Turtle
,
JSON-LD
(+
also
see
Turtle/RDF
Format
Specification
)
How 'Basic' can be used for essoteric resources - in this case, a UML class model
@prefix fhir: <http://hl7.org/fhir/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource -------------------------------------------------------------------<http://hl7.org/fhir/Basic/classModel> a fhir:Basic; fhir:nodeRole fhir:treeRoot; fhir:Resource.id [ fhir:value "classModel"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p><b>Class1</b></p>\n <ul>\n <li>Attribute1: 1..*</li>\n <li>Attribute2: 0..1</li>\n </ul>\n </div>" ]; fhir:DomainResource.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://example.org/do-not-use/fhir-extensions/UMLclass" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "name" ]; fhir:Extension.valueString [ fhir:value "Class1" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "attribute" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "name" ]; fhir:Extension.valueString [ fhir:value "attribute1" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "minOccurs" ]; fhir:Extension.valueInteger [ fhir:value "1"^^xsd:integer ] ], [ fhir:index 2; fhir:Extension.url [ fhir:value "maxOccurs" ]; fhir:Extension.valueCode [ fhir:value "*" ] ] ], [ fhir:index 2; fhir:Extension.url [ fhir:value "attribute" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "name" ]; fhir:Extension.valueString [ fhir:value "attribute2" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "minOccurs" ]; fhir:Extension.valueInteger [ fhir:value "0"^^xsd:integer ] ], [ fhir:index 2; fhir:Extension.url [ fhir:value "maxOccurs" ]; fhir:Extension.valueInteger [ fhir:value "1"^^xsd:integer ] ] ] ]; fhir:Basic.code [ fhir:CodeableConcept.coding [ fhir:index 0; fhir:Coding.system [ fhir:value "http://example.org/do-not-use/fhir-codes#resourceTypes" ]; fhir:Coding.code [ fhir:value "UMLCLASSMODEL" ] ] ] . # - ontology header ------------------------------------------------------------# This is a silly exmple showing how Basic could be used to convey a UML diagram. It is extremely #unlikely anyone would ever use FHIR to do this. (XMI isn't *that* unpleasant :>). However, it shows #how somewhat esoteric requirements that won't ever be supported by the core FHIR specification can still #be managed in a conformant manner.<http://hl7.org/fhir/Basic/classModel.ttl> a owl:Ontology; owl:imports fhir:fhir.ttl; owl:versionIRI <http://hl7.org/fhir/STU3/Basic/classModel.ttl> .<http://hl7.org/fhir/Basic/classModel> a fhir:Basic ; fhir:nodeRole fhir:treeRoot ; fhir:id [ fhir:v "classModel"] ; # fhir:text [ fhir:status [ fhir:v "generated" ] ; fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p><b>Class1</b></p>\n <ul>\n <li>Attribute1: 1..*</li>\n <li>Attribute2: 0..1</li>\n </ul>\n </div>"^^rdf:XMLLiteral ] ] ; # fhir:extension ( [ fhir:url [ fhir:v "http://example.org/do-not-use/fhir-extensions/UMLclass"^^xsd:anyURI ; fhir:l <http://example.org/do-not-use/fhir-extensions/UMLclass> ] ; fhir:extension ( [ fhir:url [ fhir:v "name"^^xsd:anyURI ; fhir:l fhir:name ] ; fhir:value [ a fhir:String ; fhir:v "Class1" ] ] [ fhir:url [ fhir:v "attribute"^^xsd:anyURI ; fhir:l fhir:attribute ] ; fhir:extension ( [ fhir:url [ fhir:v "name"^^xsd:anyURI ; fhir:l fhir:name ] ; fhir:value [ a fhir:String ; fhir:v "attribute1" ] ] [ fhir:url [ fhir:v "minOccurs"^^xsd:anyURI ; fhir:l fhir:minOccurs ] ; fhir:value [ a fhir:Integer ; fhir:v 1 ] ] [ fhir:url [ fhir:v "maxOccurs"^^xsd:anyURI ; fhir:l fhir:maxOccurs ] ; fhir:value [ a fhir:Code ; fhir:v "*" ] ] ) ] [ fhir:url [ fhir:v "attribute"^^xsd:anyURI ; fhir:l fhir:attribute ] ; fhir:extension ( [ fhir:url [ fhir:v "name"^^xsd:anyURI ; fhir:l fhir:name ] ; fhir:value [ a fhir:String ; fhir:v "attribute2" ] ] [ fhir:url [ fhir:v "minOccurs"^^xsd:anyURI ; fhir:l fhir:minOccurs ] ; fhir:value [ a fhir:Integer ; fhir:v 0 ] ] [ fhir:url [ fhir:v "maxOccurs"^^xsd:anyURI ; fhir:l fhir:maxOccurs ] ; fhir:value [ a fhir:Integer ; fhir:v 1 ] ] ) ] ) ] ) ; # fhir:code [ fhir:coding ( [ fhir:system [ fhir:v "http://example.org/do-not-use/fhir-codes#resourceTypes"^^xsd:anyURI ; fhir:l <http://example.org/do-not-use/fhir-codes#resourceTypes> ] ; fhir:code [ fhir:v "UMLCLASSMODEL" ] ] ) ] . # # -------------------------------------------------------------------------------------
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.
FHIR
®©
HL7.org
2011+.
FHIR
Release
3
(STU;
v3.0.2-11200)
R6
hl7.fhir.core#6.0.0-ballot3
generated
on
Thurs,
Oct
24,
2019
11:53+1100.
QA
Page
Thu,
Nov
27,
2025
16:53+0000.
Links:
Search
|
Version
History
|
Table
of
Contents
|
Credits
Glossary
|
QA
|
Compare
to
DSTU2
R4
|
Compare
to
R5
|
Compare
to
Last
Ballot
|
|
Propose
a
change