Page Status: updated 2022-03-04

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.

The information elements are shown in the profile NLLDataLock

Overview

idS Σ0..1System.String
versionIdS Σ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
nllTargetPatientS I0..1Extension(Reference(NLLPatient))
nllPrescriptionChainS I0..1Extension(uuid)
nllLockedSubjectTypeS I1..1Extension(code)Binding
url1..1System.StringFixed Value
valueCodecode
nllLegalGroundS I1..1Extension(code)Binding
identifierΣ0..*Identifier
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

Include and revinclude are not supported by this resource.

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
..&nllDatalockType=INTEGRITET