Page Status: updated 2023-11-22

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 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Σ I0..1Reference(Resource)
createdΣ0..1date
authorΣ I0..1Reference(Practitioner | PractitionerRole | Patient | RelatedPerson | Organization)

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