This page is part of the FHIR Specification (v3.2.0: R4 Ballot 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions
FHIR Infrastructure Work Group | Maturity Level: 0 | Draft | Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson |
Information about a user's current session.
The UserSession resource is used to represent a user's session with a server.
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
UserSession | D | DomainResource | Information about a user's current session Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..1 | Identifier | Business identifier |
user | Σ | 1..1 | Reference(Device | Practitioner | Patient | RelatedPerson) | User engaged in the session |
status | 0..1 | BackboneElement | Status of the session | |
code | Σ | 1..1 | code | activating | active | suspended | closing | closed UserSessionStatus (Required) |
source | Σ | 1..1 | code | user | system UserSessionStatusSource (Required) |
workstation | 0..1 | Identifier | Where is the session | |
focus | 0..* | Reference(Any) | What is the user's current focus | |
created | 0..1 | instant | When was the session created | |
expires | Σ | 0..1 | instant | When does the session expire |
context | 0..* | BackboneElement | Additional information about the session | |
type | 1..1 | string | What type of context value | |
value[x] | 0..1 | Value of the context | ||
valueCodeableConcept | CodeableConcept | |||
valueQuantity | Quantity | |||
Documentation for this format |
UML Diagram (Legend)
XML Template
<UserSession xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <identifier><!-- 0..1 Identifier Business identifier --></identifier> <user><!-- 1..1 Reference(Device|Practitioner|Patient|RelatedPerson) User engaged in the session --></user> <status> <!-- 0..1 Status of the session --> <code value="[code]"/><!-- 1..1 activating | active | suspended | closing | closed --> <source value="[code]"/><!-- 1..1 user | system --> </status> <workstation><!-- 0..1 Identifier Where is the session --></workstation> <focus><!-- 0..* Reference(Any) What is the user's current focus --></focus> <created value="[instant]"/><!-- 0..1 When was the session created --> <expires value="[instant]"/><!-- 0..1 When does the session expire --> <context> <!-- 0..* Additional information about the session --> <type value="[string]"/><!-- 1..1 What type of context value --> <value[x]><!-- 0..1 CodeableConcept|Quantity Value of the context --></value[x]> </context> </UserSession>
JSON Template
{ "resourceType" : "UserSession", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "identifier" : { Identifier }, // Business identifier "user" : { Reference(Device|Practitioner|Patient|RelatedPerson) }, // R! User engaged in the session "status" : { // Status of the session "code" : "<code>", // R! activating | active | suspended | closing | closed "source" : "<code>" // R! user | system }, "workstation" : { Identifier }, // Where is the session "focus" : [{ Reference(Any) }], // What is the user's current focus "created" : "<instant>", // When was the session created "expires" : "<instant>", // When does the session expire "context" : [{ // Additional information about the session "type" : "<string>", // R! What type of context value // value[x]: Value of the context. One of these 2: "valueCodeableConcept" : { CodeableConcept } "valueQuantity" : { Quantity } }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:UserSession; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:UserSession.identifier [ Identifier ]; # 0..1 Business identifier fhir:UserSession.user [ Reference(Device|Practitioner|Patient|RelatedPerson) ]; # 1..1 User engaged in the session fhir:UserSession.status [ # 0..1 Status of the session fhir:UserSession.status.code [ code ]; # 1..1 activating | active | suspended | closing | closed fhir:UserSession.status.source [ code ]; # 1..1 user | system ]; fhir:UserSession.workstation [ Identifier ]; # 0..1 Where is the session fhir:UserSession.focus [ Reference(Any) ], ... ; # 0..* What is the user's current focus fhir:UserSession.created [ instant ]; # 0..1 When was the session created fhir:UserSession.expires [ instant ]; # 0..1 When does the session expire fhir:UserSession.context [ # 0..* Additional information about the session fhir:UserSession.context.type [ string ]; # 1..1 What type of context value # UserSession.context.value[x] : 0..1 Value of the context. One of these 2 fhir:UserSession.context.valueCodeableConcept [ CodeableConcept ] fhir:UserSession.context.valueQuantity [ Quantity ] ], ...; ]
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
UserSession | D | DomainResource | Information about a user's current session Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..1 | Identifier | Business identifier |
user | Σ | 1..1 | Reference(Device | Practitioner | Patient | RelatedPerson) | User engaged in the session |
status | 0..1 | BackboneElement | Status of the session | |
code | Σ | 1..1 | code | activating | active | suspended | closing | closed UserSessionStatus (Required) |
source | Σ | 1..1 | code | user | system UserSessionStatusSource (Required) |
workstation | 0..1 | Identifier | Where is the session | |
focus | 0..* | Reference(Any) | What is the user's current focus | |
created | 0..1 | instant | When was the session created | |
expires | Σ | 0..1 | instant | When does the session expire |
context | 0..* | BackboneElement | Additional information about the session | |
type | 1..1 | string | What type of context value | |
value[x] | 0..1 | Value of the context | ||
valueCodeableConcept | CodeableConcept | |||
valueQuantity | Quantity | |||
Documentation for this format |
XML Template
<UserSession xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <identifier><!-- 0..1 Identifier Business identifier --></identifier> <user><!-- 1..1 Reference(Device|Practitioner|Patient|RelatedPerson) User engaged in the session --></user> <status> <!-- 0..1 Status of the session --> <code value="[code]"/><!-- 1..1 activating | active | suspended | closing | closed --> <source value="[code]"/><!-- 1..1 user | system --> </status> <workstation><!-- 0..1 Identifier Where is the session --></workstation> <focus><!-- 0..* Reference(Any) What is the user's current focus --></focus> <created value="[instant]"/><!-- 0..1 When was the session created --> <expires value="[instant]"/><!-- 0..1 When does the session expire --> <context> <!-- 0..* Additional information about the session --> <type value="[string]"/><!-- 1..1 What type of context value --> <value[x]><!-- 0..1 CodeableConcept|Quantity Value of the context --></value[x]> </context> </UserSession>
JSON Template
{ "resourceType" : "UserSession", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "identifier" : { Identifier }, // Business identifier "user" : { Reference(Device|Practitioner|Patient|RelatedPerson) }, // R! User engaged in the session "status" : { // Status of the session "code" : "<code>", // R! activating | active | suspended | closing | closed "source" : "<code>" // R! user | system }, "workstation" : { Identifier }, // Where is the session "focus" : [{ Reference(Any) }], // What is the user's current focus "created" : "<instant>", // When was the session created "expires" : "<instant>", // When does the session expire "context" : [{ // Additional information about the session "type" : "<string>", // R! What type of context value // value[x]: Value of the context. One of these 2: "valueCodeableConcept" : { CodeableConcept } "valueQuantity" : { Quantity } }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:UserSession; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:UserSession.identifier [ Identifier ]; # 0..1 Business identifier fhir:UserSession.user [ Reference(Device|Practitioner|Patient|RelatedPerson) ]; # 1..1 User engaged in the session fhir:UserSession.status [ # 0..1 Status of the session fhir:UserSession.status.code [ code ]; # 1..1 activating | active | suspended | closing | closed fhir:UserSession.status.source [ code ]; # 1..1 user | system ]; fhir:UserSession.workstation [ Identifier ]; # 0..1 Where is the session fhir:UserSession.focus [ Reference(Any) ], ... ; # 0..* What is the user's current focus fhir:UserSession.created [ instant ]; # 0..1 When was the session created fhir:UserSession.expires [ instant ]; # 0..1 When does the session expire fhir:UserSession.context [ # 0..* Additional information about the session fhir:UserSession.context.type [ string ]; # 1..1 What type of context value # UserSession.context.value[x] : 0..1 Value of the context. One of these 2 fhir:UserSession.context.valueCodeableConcept [ CodeableConcept ] fhir:UserSession.context.valueQuantity [ Quantity ] ], ...; ]
Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the dependency analysis
Path | Definition | Type | Reference |
---|---|---|---|
UserSession.status.code | The status of the user session | Required | UserSessionStatus |
UserSession.status.source | The source of the status of the user session | Required | UserSessionStatusSource |
The UserSession resource is used to represent the information involved in a user's session. In particular, the resource supports context synchronization use cases between systems.
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Expression | In Common |
focus | reference | The focus of the user session | UserSession.focus (Any) | |
identifier | token | External identifiers for the user session | UserSession.identifier | |
patient | reference | The identity of a patient to search for user sessions | UserSession.focus (Patient) | |
status | token | The status of the user session | UserSession.status.code | |
user | reference | The user of the session | UserSession.user (Practitioner, Device, Patient, RelatedPerson) | |
workstation | token | The workstation of the session | UserSession.workstation |