Journal notes

SFM will create journal notes suitable for inclusion to the EHR/EPJ Journal. The concept is based on a "virtual encounter", and the EHR is responsible for the management of encounter references.

In the setPatient function provided in the postMessage (workspace integration) the EHR will present an encounterIdentifier=<uniqe string> This identifier will be registered by the subsequent envets in SFM, made available by Datashare API through a query on Basic.

SFM client will notify parent frame whenever there is new events available by issuing a postMessage to the parent frame:

{
    "action": "setPatient",
    "ticket": "result",
    "showAllergies": "true",
    "onBehalfOf": "",
    "encounterIdentifier": "<encounterIdentifier from setPatient>" // Set to a unique string representing an encounter
}

The encounter ID is stored in the SFM client context and added as a header on all calls to the SFM Server API.

If the current session contains an encounter ID, received during the setPatient call, the SFM Client posts a message back to the EPJ when the LIB is signed, notifying that new data is available for the journal related to a specific encounter.

{
    "action" : "journalUpdate",
	"encounterIdentifier" : "<encounterIdentifier from setPatient>",
}

Profile

SFM journal note

idΣ0..1id
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
JournalNoteI1..1Extension(Complex)
modifierExtension?!0..*Extension
identifierΣ0..*Identifier
id0..1string
extension0..*Extension
textΣ0..0string
subjectΣ0..0Reference(Resource)
createdΣ0..1date
authorΣ0..1Reference(Practitioner | PractitionerRole | Patient | RelatedPerson | Organization)

Extension

SFM Journal note extension

id0..1string
id0..1string
extension0..*Extension
url1..1Fixed Value
valueDateTimedateTime
id0..1string
extension0..*Extension
url1..1Fixed Value
id0..1string
extension0..*Extension
systemΣ1..1uriFixed Value
versionΣ0..1string
codeΣ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
id0..1string
extension0..*Extension
url1..1Fixed Value
id0..1string
extension0..*Extension
useΣ ?!0..0codeBinding
typeΣ0..0CodeableConceptBinding
systemΣ0..0uri
valueΣ0..1string
periodΣ0..0Period
assignerΣ0..0Reference(Organization)
id0..1string
extension0..*Extension
url1..1Fixed Value
id0..1string
extension0..*Extension
referenceΣ I0..1string
typeΣ0..1sfm-MedicationStatement, sfm-NutritionStatement, sfm-BandaPrescriptionBinding
identifierΣ0..1Identifier
displayΣ0..1string
valueReferenceReference()
id0..1string
extension0..*Extension
url1..1Fixed Value
valueStringstring
id0..1string
extension0..*Extension
url1..1Fixed Value
valueStringstring
id0..1string
extension0..*Extension
url1..1Fixed Value
valueStringstring
id0..1string
id0..1string
extension0..*Extension
url1..1Fixed Value
valueDatedate
valueDateTimedateTime
id0..1string
extension0..*Extension
url1..1Fixed Value
id0..1string
extension0..*Extension
id0..1string
extension0..*Extension
systemΣ0..1uriFixed Value
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
id0..1string
extension0..*Extension
url1..1Fixed Value
valueStringstring
url1..1Fixed Value
url1..1Fixed Value

The extension has a type with a value from the code set sfm-journalnote-types indicating the category. The EHR may use this for filtering.

Retreival on Datashare

The actual retreival of journal note candidates is performed using a named query on Basic. Parameter may be the registered encounterIdentifier or a combination of patientTicket and timestamp:

GET [base]/Basic?_query=JOURNALNOTE&encounterIdentifier=(identifier given above)
GET [base]/Basic?_query=JOURNALNOTE&patientTicket=(ticket)&modified=gt(timestamp)

The search will return a list of sfm-journalnote (a FHIR basic resource) SFM journal note each containing one of sfm-journalnote-extension SFM Journal note extension

Discontinuation reason

Discontinuation reason is included in journal note, type section, so that EPJ can apply filters per discontinuation reason type. For reason “Annen” (Translation: “Other”) is also included the free text comment.

Example when discontinuation type is not “Annen”

{
  "url": "type",
  "valueCodeableConcept": {
    "coding": [
      {
        "system": "http://ehelse.no/fhir/CodeSystem/sfm-journalnote-types",
        "code": "Seponertbehandling",
        "display": "Seponert behandling: Dobbeltopforing"
      }
    ]
  }
}

Example when discontinuation type is “Annen”

{
  "url": "type",
  "valueCodeableConcept": {
    "coding": [
      {
        "system": "http://ehelse.no/fhir/CodeSystem/sfm-journalnote-types",
        "code": "Seponertbehandling",
        "display": "Seponert behandling: Dobbeltopforing"
      }
    ]
  }
}

Note that SFM will return all items matching an encounterIdentifier by the first varient, and the number of items will grow during a typical session.

Using the regret function This is not an action to be logged, however it affects what has already been logged to the journal entry log. For example if we have discontinued a prescription and we have not yet signed the LIB, the action can be regretted. That means that the prescription goes back to the state it was in before it was discontinued. In this case we do not want to return the journal entry log for discontinuing the prescription. When using the regret action we mark the corresponding log as obsolete and filter it out when the EPJ requests log from the SFM Data sharing API.

Journalnote Types

See the code system page for details: sfm-journalnote-types.codesystem

Actions to be logged can be seen in the table below.

Code Display Specification
Fornyresept Forny resept Resept has been renewed without change
EndretBehandling Endret behandling Prescription has been changed, including resept renew with change
Seponertbehandling Seponert behandling Treatment has been discontinued
Opprettetbehandling Opprettet behandling New treatment has been created
Sendtresept Sendt resept Resept has been sent to RF (M1)
Bekreftetbehandling Bekreftet behandling LIB item has been confirmed in use
SlettetOrdinasjon Slettet ordinasjon Prescription has been deleted
Legemiddelgjennomgang Gjennomført legemiddelgjennomgang Drug review / legemiddelgjennomgang has been registered / sent in PLL
OpprettetCAVE Opprettet legemiddelreaksjon New CAVE entry has been created
EndretCAVE Endret legemiddelreaksjon CAVE entry has been changed
AvkreftetCAVE Avkreftet legemiddelreaksjon CAVE entry has been refuted / "avkreftet"
SoknadHelfo Sendt søknad til Helfo Helfo application has been created
MDPamelding Registrert multidoseansvar A doctor has registered as MD for the patient / M27 has been sent to register
MDAvmelding Avregistrert multidoseansvar A doctor has unregistered as MD for the patient / M27 has been sent to unregister
OpprettetPLL Opprettet første PLL The first PLL has been sent for a patient after using the "Opprett PLL" function in SFM client
SendtPLL Sendt PLL PLL has been sent for a patient (also triggered when first PLL is sent)