Page Status: updated 2024-02-07

NLLDataLock (Basic)

Page index

Introduction

The profile NLLDataLock represents the non-standard concept of a data lock and is based on the Basic resource. A data lock (sv: spärr) is used to prevent access to certain information depending on role, purpose and access type.

In short:

  1. Resource-wise a data lock is either put on a prescription chain or a patient's paper-based prescriptions. A data lock on a prescription chain applies to all prescriptions in the chain and all dispenses related to those prescriptions. A data lock on a patient's paper-based prescriptions applies to all dispenses related to paper-based prescriptions.

  2. Information-wise a data-lock is either applied on all information or the treatment reason only.

  3. Type-wise a data-lock is either a privacy lock (sv. integritetsspärr) or a confidentiality lock (sv: sekretesspärr). A privacy lock is created by the patient to block healthcare professionals and pharmacists from seeing information. A confidentiality lock is created by healthcare professionals to block the patient, or the patient's guardian, from seeing information.

  4. Usage-wise a data-lock is applied depending on the access (HTTP header X-Access) and purpose (HTTP header X-Purpose) of a read request. In other words, a privacy lock blocks healthcare professionals and pharmacists depending on the stated purpose and access when information is retrieved from the medication list.

Typical scenarios when a data lock can be used:

  • A patient adds a privacy lock on a MedicationRequest (sv: integritetsspärr av förskrivning). This blocks:

    • healthcare professionals from seeing the prescription and all related dispenses and

    • pharmacists from seeing the prescription and all related dispenses when the purpose is to facilitate the patient's use of medications (sv. underlättande av patients läkemedelsanvändning).

  • A patient adds a privacy lock on a MedicationRequest to block pharmacists from seeing the treatment reason (sv: integritetsspärr av behandlingsorsak) when the purpose is to dispense medications.

  • A patient adds a privacy lock on all MedicationDispenses related to paper-based prescriptions (sv: spärr av uttag pappersrecept). This blocks:

    • healthcare professionals from seeing any paper-based dispenses and

    • pharmacists from seeing any paper-based dispenses when the purpose is to facilitate the patient's use of medications (sv. underlättande av patients läkemedelsanvändning).

  • A healthcare practitioner adds a confidentiality lock on a MedicationRequest to block the patient from seeing the treatment reason.

  • A healthcare practitioner adds a confidentiality lock on a MedicationRequest to block the patient’s guardians (sv. vårdnadshavare) from seeing the prescription.

  • A healthcare practitioner or a pharmacist can add a privacy lock on behalf of the patient. This applies to all privacy locks described above.

Note! A medication request with a data lock is excluded from the patient's medication list if the stated purpose and type of access is applicable to the data lock. The data lock flag in the medication list NLLMedicationListInfo (Basic.extension:nllPrivacyLock) indicates if there are any data locks for the patient not if a data lock was triggered by the request.

lock_filter_drawing

The information elements are shown in the profile NLLDataLock

Regarding information about how the "must support"-property is used in the Swedish National MedicationList, please refer to the page Resources

Overview

idS Σ0..1string
id0..1string
extensionI0..*Extension
versionIdS Σ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
nllTargetPatientS I0..1Extension(Reference(NLLPatient))
nllPrescriptionChainS I0..1Extension(uuid)
nllLockedSubjectTypeS I1..1Extension(code)Binding
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueCodecode
nllLegalGroundS I1..1Extension(code)Binding
modifierExtension?! I0..*Extension
identifierΣ0..*Identifier
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uriFixed Value
versionS Σ0..1string
codeS Σ1..1codeFixed Value
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
subjectΣ0..1Reference(Resource)
createdΣ0..1date
authorΣ0..1Reference(Practitioner | PractitionerRole | Patient | RelatedPerson | Organization)
Basic
DefinitionAs described in "Lag (2018:1212) om nationell läkemedelslista" chapter 4, it must be possible for a patient or practitioner to lock parts of a prescription. An active DataLock referencing a resource shows that parts of, or the full resource, should be filtered based on who/what tries to access the information. The filtering is done by the Swedish eHealth Agency, given which role tries to acess the resource (target of the DataLock) and purpose of the access. Creating or in-activating a DataLock is done by the client.
Cardinality0...*
AliasZ-resource, Extension-resource, Custom-resource
Invariants
  • dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources
    contained.contained.empty()
  • dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
    contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
  • dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
    contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
  • dom-5: If a resource is contained in another resource, it SHALL NOT have a security label
    contained.meta.security.empty()
  • dom-6: A resource should have narrative for robust management
    text.`div`.exists()
Mappings
  • rim: Entity. Role, or Act
  • rim: Act, Entity or Role
Basic.id
DefinitionThe logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
Cardinality0...1
Typestring
Must SupportTrue
SummaryTrue
Comments

The only time that a resource does not have an id is when it is being submitted to the server using a create operation. This id is identified by the URI http://electronichealth.se/identifier/nlldatalockid in documentation and external systems.

Mappings
  • EHM: Spärr-id
Basic.meta
DefinitionThe metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
Cardinality0...1
TypeMeta
Must SupportTrue
SummaryTrue
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.meta.id
DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Mappings
  • rim: n/a
Basic.meta.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
Basic.meta.versionId
DefinitionThe version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
Cardinality0...1
Typeid
Must SupportTrue
SummaryTrue
Comments

The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • EHM: Spärrversion
Basic.meta.lastUpdated
DefinitionWhen the resource last changed - e.g. when the version changed.
Cardinality0...1
Typeinstant
SummaryTrue
Comments

This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a read interaction.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.meta.source
DefinitionA uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.
Cardinality0...1
Typeuri
SummaryTrue
Comments

In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used.

This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.meta.profile
DefinitionA list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).
Cardinality0...*
Typecanonical(StructureDefinition)
SummaryTrue
Comments

It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.meta.security
DefinitionSecurity labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
Cardinality0...*
TypeCoding
Binding

Security Labels from the Healthcare Privacy and Security Classification System.

security-labels (extensible)
Must SupportTrue
SummaryTrue
Comments

The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.meta.security.id
DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Mappings
  • rim: n/a
Basic.meta.security.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
Basic.meta.security.system
DefinitionThe identification of the code system that defines the meaning of the symbol in the code.
Cardinality0...1
Typeuri
Must SupportTrue
SummaryTrue
Requirements

Need to be unambiguous about the source of the definition of the symbol.

Comments

The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.3
  • rim: ./codeSystem
  • orim: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem
Basic.meta.security.version
DefinitionThe version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
Cardinality0...1
Typestring
Must SupportTrue
SummaryTrue
Comments

Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.7
  • rim: ./codeSystemVersion
  • orim: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion
Basic.meta.security.code
DefinitionA symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
Cardinality0...1
Typecode
Must SupportTrue
SummaryTrue
Requirements

Need to refer to a particular code in the system.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.1
  • rim: ./code
  • orim: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code
Basic.meta.security.display
DefinitionA representation of the meaning of the code in the system, following the rules of the system.
Cardinality0...1
Typestring
SummaryTrue
Requirements

Need to be able to carry a human-readable meaning of the code for readers that do not know the system.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.2 - but note this is not well followed
  • rim: CV.displayName
  • orim: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName
Basic.meta.security.userSelected
DefinitionIndicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
Cardinality0...1
Typeboolean
SummaryTrue
Requirements

This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.

Comments

Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: Sometimes implied by being first
  • rim: CD.codingRationale
  • orim: fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]
Basic.meta.tag
DefinitionTags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
Cardinality0...*
TypeCoding
Binding

Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".

CommonTags (example)
SummaryTrue
Comments

The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.implicitRules
DefinitionA reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
Cardinality0...1
Typeuri
ModifierTrue
SummaryTrue
Comments

Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.language
DefinitionThe base language in which the resource is written.
Cardinality0...1
Typecode
Binding

A human language.

CommonLanguages (preferred)
Comments

Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Basic.text
DefinitionA human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
Cardinality0...1
TypeNarrative
Aliasnarrative, html, xhtml, display
Comments

Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • rim: Act.text?
Basic.contained
DefinitionThese resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
Cardinality0...*
TypeResource
Aliasinline resources, anonymous resources, contained resources
Comments

This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.

Mappings
  • rim: N/A
Basic.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality3...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
Basic.extension:nllTargetPatient
DefinitionReference to the patient whos processesing of personal data is affected by the lock.
Cardinality0...1
TypeExtension(Reference(NLLPatient))
Must SupportTrue
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
  • rim: n/a
  • EHM: Referens till patient
Basic.extension:nllPrescriptionChain
DefinitionPrescription chain id that is locked. All MedicationRequests and MedicationDispenses in the prescription chain are locked.
Cardinality0...1
TypeExtension(uuid)
Must SupportTrue
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
  • rim: n/a
  • EHM: Förskrivningskedje-id
Basic.extension:nllLockedSubjectType
DefinitionType of information locked by the presence of the data lock. The locked information is all treatment reasons (sv: behandlingsorsak) for a confidentiality lock with the type SEKRETESS_PAT. Otherwise it is either a complete prescription chain (sv förskrivningskedja) or all dispenses for paper prescriptions (sv: pappersuttag) for the referenced patient.
Cardinality1...1
TypeExtension(code)
Bindinglocked-subjects (required)
Must SupportTrue
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
  • rim: n/a
  • EHM: Spärrad uppgift
Basic.extension:nllStatus
DefinitionThe status of the lock, reflects if it is active or not
Cardinality1...1
TypeExtension(code)
Must SupportTrue
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
  • rim: n/a
  • EHM: Spärrstatus
Basic.extension:nllStatus.id
DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Mappings
  • rim: n/a
Basic.extension:nllStatus.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
Basic.extension:nllStatus.url
DefinitionSource of the definition for the extension code - a logical name or a URL.
Cardinality1...1
Typeuri
Comments

The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.

Fixed Value

http://electronichealth.se/fhir/StructureDefinition/NLLDataLockStatus

Mappings
  • rim: N/A
Basic.extension:nllStatus.value[x]
DefinitionValue of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).
Cardinality1...1
Typecode
Bindingdata-lock-status (required)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • rim: N/A
Basic.extension:nllLegalGround
DefinitionThe legal ground defines who the lock applies to and the legal ground for setting the data lock.
An privacy lock (INTEGRITET) affects the purpose "health care" (sv "vård") for health care pracititioners and the purpose "support patient medication use" (sv "underlättande av patients läkemedelsanvändning") for pharmacy personnel.
A confidentiality lock applies to the patient (SEKRETESS_PAT) or the patient's guardian (SEKRETESS_VH). The confidentiality lock is based on a confidentiality assessment according to the law "Public Access to Information and Secrecy Act" (sv Offentlighets- och sekretesslag).
Cardinality1...1
TypeExtension(code)
Bindingdata-lock-types (required)
Must SupportTrue
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
  • rim: n/a
  • EHM: Spärrorsak
Basic.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Cardinality0...*
TypeExtension
ModifierTrue
Aliasextensions, user content
Requirements

Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.

Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: N/A
Basic.identifier
DefinitionIdentifier assigned to the resource for business purposes, outside the context of FHIR.
Cardinality0...*
TypeIdentifier
SummaryTrue
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • w5: FiveWs.identifier
  • rim: ./identifier
Basic.code
DefinitionThe type of resource is "Data Lock" (sv. Spärr)
Cardinality1...1
TypeCodeableConcept
Binding

Codes for identifying types of Basic

basic-resource-types (required)
Must SupportTrue
ModifierTrue
SummaryTrue
Requirements

Must be able to distinguish different types of Basic resources.

Comments

Because resource references will only be able to indicate 'Basic', the type of reference will need to be specified in a Profile identified as part of the resource. Refer to the resource notes section for information on appropriate terminologies for this code.

This element is labeled as a modifier because it defines the meaning of the resource and cannot be ignored.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • w5: FiveWs.what[x]
  • rim: ./code
  • EHM: Resurstyp Spärr
Basic.code.id
DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Mappings
  • rim: n/a
Basic.code.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
Basic.code.coding
DefinitionA reference to a code defined by a terminology system.
Cardinality1...1
TypeCoding
Must SupportTrue
SummaryTrue
Requirements

Allows for alternative encodings within a code system, and translations to other code systems.

Comments

Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.1-8, C*E.10-22
  • rim: union(., ./translation)
  • orim: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding
Basic.code.coding.id
DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Mappings
  • rim: n/a
Basic.code.coding.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
Basic.code.coding.system
DefinitionThe identification of the code system that defines the meaning of the symbol in the code.
Cardinality0...1
Typeuri
Must SupportTrue
SummaryTrue
Requirements

Need to be unambiguous about the source of the definition of the symbol.

Comments

The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Fixed Value

http://ehalsomyndigheten.se/fhir/CodeSystem/basic-resource-types

Mappings
  • v2: C*E.3
  • rim: ./codeSystem
  • orim: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem
Basic.code.coding.version
DefinitionThe version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
Cardinality0...1
Typestring
Must SupportTrue
SummaryTrue
Comments

Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.7
  • rim: ./codeSystemVersion
  • orim: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion
Basic.code.coding.code
DefinitionA symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
Cardinality1...1
Typecode
Must SupportTrue
SummaryTrue
Requirements

Need to refer to a particular code in the system.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Fixed Value

datalock

Mappings
  • v2: C*E.1
  • rim: ./code
  • orim: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code
Basic.code.coding.display
DefinitionA representation of the meaning of the code in the system, following the rules of the system.
Cardinality0...1
Typestring
SummaryTrue
Requirements

Need to be able to carry a human-readable meaning of the code for readers that do not know the system.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.2 - but note this is not well followed
  • rim: CV.displayName
  • orim: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName
Basic.code.coding.userSelected
DefinitionIndicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
Cardinality0...1
Typeboolean
SummaryTrue
Requirements

This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.

Comments

Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: Sometimes implied by being first
  • rim: CD.codingRationale
  • orim: fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]
Basic.code.text
DefinitionA human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
Cardinality0...1
Typestring
SummaryTrue
Requirements

The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.

Comments

Very often the text is the same as a displayName of one of the codings.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • v2: C*E.9. But note many systems use C*E.2 for this
  • rim: ./originalText[mediaType/code="text/plain"]/data
  • orim: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText
Basic.subject
DefinitionIdentifies the patient, practitioner, device or any other resource that is the "focus" of this resource.
Cardinality0...1
TypeReference(Resource)
SummaryTrue
Requirements

Needed for partitioning the resource by Patient.

Comments

Optional as not all potential resources will have subjects. Resources associated with multiple subjects can handle this via extension.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • w5: FiveWs.subject[x]
  • rim: ./participation[typeCode='SBJ'] (possibly through a ControlAct and Role)
  • w5: FiveWs.subject
Basic.created
DefinitionIdentifies when the resource was first created.
Cardinality0...1
Typedate
SummaryTrue
Requirements

Allows ordering resource instances by time.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • w5: FiveWs.recorded
  • rim: ./participation[typeCode='AUT']/time (possibly through a ControlAct and Role)
Basic.author
DefinitionIndicates who was responsible for creating the resource instance.
Cardinality0...1
TypeReference(Practitioner | PractitionerRole | Patient | RelatedPerson | Organization)
SummaryTrue
Requirements

Needed for partitioning the resource.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() or (children().count() > id.count())
Mappings
  • w5: FiveWs.author
  • rim: ./participation[typeCode='SUB'] (possibly through a ControlAct and Role)
<StructureDefinition xmlns="http://hl7.org/fhir">
    <id value="b2cad53e-1da5-4653-bf79-9ed45f433534" />
    <meta>
        <versionId value="1" />
        <lastUpdated value="2024-08-28T06:34:02.402075+00:00" />
    </meta>
    <url value="http://electronichealth.se/fhir/StructureDefinition/NLLDataLock" />
    <version value="1.1.0" />
    <name value="NLLDataLock" />
    <status value="active" />
    <date value="2024-08-28" />
    <publisher value="Swedish eHealth Agency" />
    <fhirVersion value="4.0.1" />
    <mapping>
        <identity value="EHM" />
        <uri value="http://ehalsomyndigheten.se" />
        <name value="E-h&#228;lsomyndigheten concept" />
    </mapping>
    <mapping>
        <identity value="rim" />
        <uri value="http://hl7.org/v3" />
        <name value="RIM Mapping" />
    </mapping>
    <mapping>
        <identity value="w5" />
        <uri value="http://hl7.org/fhir/fivews" />
        <name value="FiveWs Pattern Mapping" />
    </mapping>
    <kind value="resource" />
    <abstract value="false" />
    <type value="Basic" />
    <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic" />
    <derivation value="constraint" />
    <differential>
        <element id="Basic">
            <path value="Basic" />
            <short value="Information showing that the target resource has an privacy (sv integritet) or confidenitiality (sv sekretess) lock" />
            <definition value="As described in &quot;Lag (2018:1212) om nationell l&#228;kemedelslista&quot; chapter 4, it must be possible for a patient or practitioner to lock parts of a prescription. An active DataLock referencing a resource shows that parts of, or the full resource, should be filtered based on who/what tries to access the information. The filtering is done by the Swedish eHealth Agency, given which role tries to acess the resource (target of the DataLock) and purpose of the access. Creating or in-activating a DataLock is done by the client." />
        </element>
        <element id="Basic.id">
            <path value="Basic.id" />
            <comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation.\nThis id is identified by the URI http://electronichealth.se/identifier/nlldatalockid in documentation and external systems." />
            <mustSupport value="true" />
            <mapping>
                <identity value="EHM" />
                <map value="Sp&#228;rr-id" />
            </mapping>
        </element>
        <element id="Basic.meta">
            <path value="Basic.meta" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.meta.versionId">
            <path value="Basic.meta.versionId" />
            <mustSupport value="true" />
            <mapping>
                <identity value="EHM" />
                <map value="Sp&#228;rrversion" />
            </mapping>
        </element>
        <element id="Basic.meta.security">
            <path value="Basic.meta.security" />
            <mustSupport value="true" />
            <binding>
                <strength value="extensible" />
                <valueSet value="http://ehalsomyndigheten.se/fhir/ValueSet/security-labels" />
            </binding>
        </element>
        <element id="Basic.meta.security.system">
            <path value="Basic.meta.security.system" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.meta.security.version">
            <path value="Basic.meta.security.version" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.meta.security.code">
            <path value="Basic.meta.security.code" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.extension">
            <path value="Basic.extension" />
            <min value="3" />
        </element>
        <element id="Basic.extension:nllTargetPatient">
            <path value="Basic.extension" />
            <sliceName value="nllTargetPatient" />
            <short value="Reference to patient affected by this lock" />
            <definition value="Reference to the patient whos processesing of personal data is affected by the lock." />
            <max value="1" />
            <type>
                <code value="Extension" />
                <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLDataLockTarget" />
            </type>
            <mustSupport value="true" />
            <mapping>
                <identity value="EHM" />
                <map value="Referens till patient" />
            </mapping>
        </element>
        <element id="Basic.extension:nllPrescriptionChain">
            <path value="Basic.extension" />
            <sliceName value="nllPrescriptionChain" />
            <short value="Prescription chain id" />
            <definition value="Prescription chain id that is locked. All MedicationRequests and MedicationDispenses in the prescription chain are locked." />
            <max value="1" />
            <type>
                <code value="Extension" />
                <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLPrescriptionChain" />
            </type>
            <mustSupport value="true" />
            <mapping>
                <identity value="EHM" />
                <map value="F&#246;rskrivningskedje-id" />
            </mapping>
        </element>
        <element id="Basic.extension:nllLockedSubjectType">
            <path value="Basic.extension" />
            <sliceName value="nllLockedSubjectType" />
            <short value="Type of information locked" />
            <definition value="Type of information locked by the presence of the data lock. The locked information is all treatment reasons (sv: behandlingsorsak) for a confidentiality lock with the type SEKRETESS_PAT. Otherwise it is either a complete prescription chain (sv f&#246;rskrivningskedja) or all dispenses for paper prescriptions (sv: pappersuttag) for the referenced patient." />
            <min value="1" />
            <max value="1" />
            <type>
                <code value="Extension" />
                <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLLockedSubjectType" />
            </type>
            <mustSupport value="true" />
            <binding>
                <strength value="required" />
                <valueSet value="http://ehalsomyndigheten.se/fhir/ValueSet/locked-subjects" />
            </binding>
            <mapping>
                <identity value="EHM" />
                <map value="Sp&#228;rrad uppgift" />
            </mapping>
        </element>
        <element id="Basic.extension:nllStatus">
            <path value="Basic.extension" />
            <sliceName value="nllStatus" />
            <short value="The status of the lock, reflects if it is active or not" />
            <definition value="The status of the lock, reflects if it is active or not" />
            <min value="1" />
            <type>
                <code value="Extension" />
                <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLDataLockStatus" />
            </type>
            <mustSupport value="true" />
            <mapping>
                <identity value="EHM" />
                <map value="Sp&#228;rrstatus" />
            </mapping>
        </element>
        <element id="Basic.extension:nllStatus.value[x]">
            <path value="Basic.extension.value[x]" />
            <binding>
                <strength value="required" />
                <valueSet value="http://ehalsomyndigheten.se/fhir/ValueSet/data-lock-status" />
            </binding>
        </element>
        <element id="Basic.extension:nllLegalGround">
            <path value="Basic.extension" />
            <sliceName value="nllLegalGround" />
            <short value="Legal ground for the data lock" />
            <definition value="The legal ground defines who the lock applies to and the legal ground for setting the data lock. &lt;br&gt;\nAn privacy lock (INTEGRITET) affects the purpose &quot;health care&quot; (sv &quot;v&#229;rd&quot;) for health care pracititioners and the purpose &quot;support patient medication use&quot; (sv &quot;underl&#228;ttande av patients l&#228;kemedelsanv&#228;ndning&quot;) for pharmacy personnel.&lt;br&gt;\nA confidentiality lock applies to the patient (SEKRETESS_PAT) or the patient&#39;s guardian (SEKRETESS_VH). The confidentiality lock is based on a confidentiality assessment according to the law &quot;Public Access to Information and Secrecy Act&quot; (sv Offentlighets- och sekretesslag)." />
            <min value="1" />
            <max value="1" />
            <type>
                <code value="Extension" />
                <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLDataLockLegalGround" />
            </type>
            <mustSupport value="true" />
            <binding>
                <strength value="required" />
                <valueSet value="http://ehalsomyndigheten.se/fhir/ValueSet/data-lock-types" />
            </binding>
            <mapping>
                <identity value="EHM" />
                <map value="Sp&#228;rrorsak" />
            </mapping>
        </element>
        <element id="Basic.code">
            <path value="Basic.code" />
            <short value="Resource type: Data Lock (sv. Sp&#228;rr)" />
            <definition value="The type of resource is &quot;Data Lock&quot; (sv. Sp&#228;rr)" />
            <mustSupport value="true" />
            <binding>
                <strength value="required" />
                <description value="Codes for identifying types of Basic" />
                <valueSet value="http://ehalsomyndigheten.se/fhir/ValueSet/basic-resource-types" />
            </binding>
            <mapping>
                <identity value="EHM" />
                <map value="Resurstyp Sp&#228;rr" />
            </mapping>
        </element>
        <element id="Basic.code.coding">
            <path value="Basic.code.coding" />
            <min value="1" />
            <max value="1" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.code.coding.system">
            <path value="Basic.code.coding.system" />
            <fixedUri value="http://ehalsomyndigheten.se/fhir/CodeSystem/basic-resource-types" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.code.coding.version">
            <path value="Basic.code.coding.version" />
            <mustSupport value="true" />
        </element>
        <element id="Basic.code.coding.code">
            <path value="Basic.code.coding.code" />
            <min value="1" />
            <fixedCode value="datalock" />
            <mustSupport value="true" />
        </element>
    </differential>
</StructureDefinition>
{
    "resourceType": "StructureDefinition",
    "id": "b2cad53e-1da5-4653-bf79-9ed45f433534",
    "meta": {
        "versionId": "1",
        "lastUpdated": "08/28/2024 06:34:02"
    },
    "url": "http://electronichealth.se/fhir/StructureDefinition/NLLDataLock",
    "version": "1.1.0",
    "name": "NLLDataLock",
    "status": "active",
    "date": "2024-08-28",
    "publisher": "Swedish eHealth Agency",
    "fhirVersion": "4.0.1",
    "mapping":  [
        {
            "identity": "EHM",
            "uri": "http://ehalsomyndigheten.se",
            "name": "E-hälsomyndigheten concept"
        },
        {
            "identity": "rim",
            "uri": "http://hl7.org/v3",
            "name": "RIM Mapping"
        },
        {
            "identity": "w5",
            "uri": "http://hl7.org/fhir/fivews",
            "name": "FiveWs Pattern Mapping"
        }
    ],
    "kind": "resource",
    "abstract": false,
    "type": "Basic",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Basic",
    "derivation": "constraint",
    "differential": {
        "element":  [
            {
                "id": "Basic",
                "path": "Basic",
                "short": "Information showing that the target resource has an privacy (sv integritet) or confidenitiality (sv sekretess) lock",
                "definition": "As described in \"Lag (2018:1212) om nationell läkemedelslista\" chapter 4, it must be possible for a patient or practitioner to lock parts of a prescription. An active DataLock referencing a resource shows that parts of, or the full resource, should be filtered based on who/what tries to access the information. The filtering is done by the Swedish eHealth Agency, given which role tries to acess the resource (target of the DataLock) and purpose of the access. Creating or in-activating a DataLock is done by the client."
            },
            {
                "id": "Basic.id",
                "path": "Basic.id",
                "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.\nThis id is identified by the URI http://electronichealth.se/identifier/nlldatalockid in documentation and external systems.",
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Spärr-id"
                    }
                ]
            },
            {
                "id": "Basic.meta",
                "path": "Basic.meta",
                "mustSupport": true
            },
            {
                "id": "Basic.meta.versionId",
                "path": "Basic.meta.versionId",
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Spärrversion"
                    }
                ]
            },
            {
                "id": "Basic.meta.security",
                "path": "Basic.meta.security",
                "mustSupport": true,
                "binding": {
                    "strength": "extensible",
                    "valueSet": "http://ehalsomyndigheten.se/fhir/ValueSet/security-labels"
                }
            },
            {
                "id": "Basic.meta.security.system",
                "path": "Basic.meta.security.system",
                "mustSupport": true
            },
            {
                "id": "Basic.meta.security.version",
                "path": "Basic.meta.security.version",
                "mustSupport": true
            },
            {
                "id": "Basic.meta.security.code",
                "path": "Basic.meta.security.code",
                "mustSupport": true
            },
            {
                "id": "Basic.extension",
                "path": "Basic.extension",
                "min": 3
            },
            {
                "id": "Basic.extension:nllTargetPatient",
                "path": "Basic.extension",
                "sliceName": "nllTargetPatient",
                "short": "Reference to patient affected by this lock",
                "definition": "Reference to the patient whos processesing of personal data is affected by the lock.",
                "max": "1",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://electronichealth.se/fhir/StructureDefinition/NLLDataLockTarget"
                        ]
                    }
                ],
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Referens till patient"
                    }
                ]
            },
            {
                "id": "Basic.extension:nllPrescriptionChain",
                "path": "Basic.extension",
                "sliceName": "nllPrescriptionChain",
                "short": "Prescription chain id",
                "definition": "Prescription chain id that is locked. All MedicationRequests and MedicationDispenses in the prescription chain are locked.",
                "max": "1",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://electronichealth.se/fhir/StructureDefinition/NLLPrescriptionChain"
                        ]
                    }
                ],
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Förskrivningskedje-id"
                    }
                ]
            },
            {
                "id": "Basic.extension:nllLockedSubjectType",
                "path": "Basic.extension",
                "sliceName": "nllLockedSubjectType",
                "short": "Type of information locked",
                "definition": "Type of information locked by the presence of the data lock. The locked information is all treatment reasons (sv: behandlingsorsak) for a confidentiality lock with the type SEKRETESS_PAT. Otherwise it is either a complete prescription chain (sv förskrivningskedja) or all dispenses for paper prescriptions (sv: pappersuttag) for the referenced patient.",
                "min": 1,
                "max": "1",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://electronichealth.se/fhir/StructureDefinition/NLLLockedSubjectType"
                        ]
                    }
                ],
                "mustSupport": true,
                "binding": {
                    "strength": "required",
                    "valueSet": "http://ehalsomyndigheten.se/fhir/ValueSet/locked-subjects"
                },
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Spärrad uppgift"
                    }
                ]
            },
            {
                "id": "Basic.extension:nllStatus",
                "path": "Basic.extension",
                "sliceName": "nllStatus",
                "short": "The status of the lock, reflects if it is active or not",
                "definition": "The status of the lock, reflects if it is active or not",
                "min": 1,
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://electronichealth.se/fhir/StructureDefinition/NLLDataLockStatus"
                        ]
                    }
                ],
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Spärrstatus"
                    }
                ]
            },
            {
                "id": "Basic.extension:nllStatus.value[x]",
                "path": "Basic.extension.value[x]",
                "binding": {
                    "strength": "required",
                    "valueSet": "http://ehalsomyndigheten.se/fhir/ValueSet/data-lock-status"
                }
            },
            {
                "id": "Basic.extension:nllLegalGround",
                "path": "Basic.extension",
                "sliceName": "nllLegalGround",
                "short": "Legal ground for the data lock",
                "definition": "The legal ground defines who the lock applies to and the legal ground for setting the data lock. <br>\nAn privacy lock (INTEGRITET) affects the purpose \"health care\" (sv \"vård\") for health care pracititioners and the purpose \"support patient medication use\" (sv \"underlättande av patients läkemedelsanvändning\") for pharmacy personnel.<br>\nA confidentiality lock applies to the patient (SEKRETESS_PAT) or the patient's guardian (SEKRETESS_VH). The confidentiality lock is based on a confidentiality assessment according to the law \"Public Access to Information and Secrecy Act\" (sv Offentlighets- och sekretesslag).",
                "min": 1,
                "max": "1",
                "type":  [
                    {
                        "code": "Extension",
                        "profile":  [
                            "http://electronichealth.se/fhir/StructureDefinition/NLLDataLockLegalGround"
                        ]
                    }
                ],
                "mustSupport": true,
                "binding": {
                    "strength": "required",
                    "valueSet": "http://ehalsomyndigheten.se/fhir/ValueSet/data-lock-types"
                },
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Spärrorsak"
                    }
                ]
            },
            {
                "id": "Basic.code",
                "path": "Basic.code",
                "short": "Resource type: Data Lock (sv. Spärr)",
                "definition": "The type of resource is \"Data Lock\" (sv. Spärr)",
                "mustSupport": true,
                "binding": {
                    "strength": "required",
                    "description": "Codes for identifying types of Basic",
                    "valueSet": "http://ehalsomyndigheten.se/fhir/ValueSet/basic-resource-types"
                },
                "mapping":  [
                    {
                        "identity": "EHM",
                        "map": "Resurstyp Spärr"
                    }
                ]
            },
            {
                "id": "Basic.code.coding",
                "path": "Basic.code.coding",
                "min": 1,
                "max": "1",
                "mustSupport": true
            },
            {
                "id": "Basic.code.coding.system",
                "path": "Basic.code.coding.system",
                "fixedUri": "http://ehalsomyndigheten.se/fhir/CodeSystem/basic-resource-types",
                "mustSupport": true
            },
            {
                "id": "Basic.code.coding.version",
                "path": "Basic.code.coding.version",
                "mustSupport": true
            },
            {
                "id": "Basic.code.coding.code",
                "path": "Basic.code.coding.code",
                "min": 1,
                "fixedCode": "datalock",
                "mustSupport": true
            }
        ]
    }
}
Basic..
Basic.id..
Basic.meta..
Basic.meta.versionId..
Basic.meta.security..
Basic.meta.security.system..
Basic.meta.security.version..
Basic.meta.security.code..
Basic.extension3..
Basic.extensionExtension..1
Basic.extensionExtension..1
Basic.extensionExtension1..1
Basic.extensionExtension1..
Basic.extension.value[x]..
Basic.extensionExtension1..1
Basic.code..
Basic.code.coding1..1
Basic.code.coding.system..
Basic.code.coding.version..
Basic.code.coding.code1..

Details

Description of all elements can be found here, Element descriptions.

Mapping of FHIR element names to Swedish National Medication List names can be found here, Element language mappings.

Datalock types

Type Parameter Description
Privacy lock INTEGRITET A privacy lock (sv: integritetsspärr, patient) could be added by a patient to hide a prescription chain (all MedicationRequests in the prescription chain, and all related MedicationDispenses), or all dispenses related to paper prescriptions, from the patient's medication list. This will filter the information when accessed by a health care practitioner, or a pharmacist with purpose of facilitate the patient's use of medications (ULA sv: underlätta läkemedelsanvändning).
A patient can also choose to put a privacy lock specifically on the treatment reason. This will only apply to pharmacists accessing prescriptions with the purpose of dipsensing (sv: expediering)
Confidentiality lock (guardian) SEKRETESS_VH A confidentiality lock for guardians (sv: sekretess-spärr vårdnadshavare) is added by a practitioner and will hide all prescriptions in a prescription chain, and the related dispenses, from the patient's list from the guardian
Confidentiality lock (patient) SEKRETESS_PAT A confidentiality lock (sv: sekretess-spärr patient) is added by a practitioner and will hide the treatment reason in the MedicationRequest if accessed by the patient

A data lock can be added on behalf of the responsible party, e.g. a patient can ask a practitioner to add a data lock on their behalf when the medication request is created or ask a pharmacist when registering a paper prescription.

A MedicationRequest may have several data locks referring to it. As an example - the practitioner may add a secrecy lock that applies to the patient to block the treatment reason and the patient could add an integrity lock to the same MedicationRequest.

Datalock subjects

Parameter Description
FORSKRIVNINGSKEDJA Locked Prescription chain (sv: Spärrad förskrivningskedja)
BEHANDLINGSORSAK Locked treatment reason (sv. Behandlingsorsak är spärrad)
UTTAGPAPPERSRECEPT Locked dispenses related to paper prescriptions (sv: Uttag pappersrecept spärrad)

Supported operations

HTTP methods

Operation Supported Comment
Search (GET, POST) yes See below for supported search options.
Insert (POST) yes
Update (PUT) yes
Delete (DEL) no
Operation (GET, POST) no

When interacting with this resource a set of HTTP-headers must be included in the request, see HTTP Header and Authorization.

Query operations

Supported queries

The following query alternatives are available for this resource.

  1. ../Basic/[id]
  2. ../Basic/[id]/_history
  3. ../Basic?[parameters]
    Parameter chain:
    code=datalock
    &patient._id=[id]|nllPrescriptionChain=[UUID]
    {&nllStatus=[text]}
    {&nllLockedSubjectType=[text]}
    {&nllDataLockLegalGround=[text]}

Compartment searches

Supported searches on a compartment. This kind of search returns a bundle with the related resources.

  1. ../Basic/[id]/Provenance returns all Provenances related to the data lock.

Include & reverse includes

Supported usage of include and revinclude. This kind of search returns a bundle of both the base resource and the related resources specified in the parameter.

  1. ../Basic?[parameters]&_revinclude=Provenance:target:Basic returns one or more Basic resources together with their Provenances. The Provenance returned is the one pointing at the returned version of the Basic resource. See above for a list of valid parameters.

Example: ../Basic?patient._id=<uuid>&code=datalock&_revinclude=Provenance:target:Basic returns the patient's data locks including one provenance per data lock.

For generic information about how to search in FHIR look here.

Search parameters

The table below shows all supported search parameters.

Parameter Description Comment
Basic/[id] A read based on the logical ID (UUID) of a data lock
../Basic/<uuid>
_history A vread to get all versions of a data lock
../Basic/<uuid>/_history
code Type of resource, mandatory
..?code=datalock
patient._id Logical id of the patient
..&patient._id=<uuid>
Either this paramater or nllPrescriptionChain must be defined in the query
nllPrescriptionChain Id of the prescription chain
..&nllPrescriptionChain=<uuid>
Either patient._id or this parameter must be defined in the query
nllLockedSubjectType Type of lock
..&nllLockedSubjectType=FORSKRIVNINGSKEDJA
nllStatus Status
..&nllStatus=active
nllDataLockLegalGround The type (legal ground) of lock
..&nllDataLockLegalGround=INTEGRITET