Practitioner
Introduction
Using the Practitioner resource in SFM is restricted to using the sfm-Practitioner resource
The resource is available to make it possible for EPJ systems to write and update information about the users. SFM looks up practitioner information in HPR registry (Helsepersonellregisteret - the norwegian official registry for healthcare professionals) to keep information provided by the EPJs up to date.
Write practitioner information
- Admin user (SFM-Person) logs in to EPJ
- EPJ accepts log in.
- The user with priveliges creates or updates practitioner information within EPJ.
- The EPJ makes a POST/PUT request to SFM
- SFM validates that identifiers are valid
- SFM validates incoming information against existing data, checks if user exists before on POST and if identifiers exists on different user for PUT
- If all validation passes then SFM creates/updates the practitioner in SFM. SFM then returns FHIR status response (200/400)
- EPJ presents OK or error to user.
Input information and checks performed
Only the commands PUT, POST and GET are made available for users. PUT and POST is restricted to users with admin privileges and should only be used when the user is editing information about the practitioner.
GET: Allowed parameters for searching practitioners in SFM:
- Identifiers: FNR, DNR, HPRid
- Name: Given or family names
- Active: true for all active practitioners, false for all inactive practitioners
Validation done for both create and update
- Validate that at least 1 valid identifier is sent in. If no valid identifier is sent in then an error will be returned with the message: "No identifier supplied. Create or Update must include at least one official identifier (FNR/DNR) or an HPR number."
- Validate only 1 official identifier, if both FNR and DNR are sent in. If more than 1 official identifier is sent in then an error will be returned with the message: "Practitioner cannot have both FNR and DNR active."
- Validate that Test FNRs or Test DNRs are not used in production. If the official identifier sent in is a Test identifier (+65/+80) then an error will be returned IF in a production environment, with the message: "Test Fnr/Dnr cannot be used in production. Fnr/Dnr: {0}"
- For users without an HPR the first and last name must be included in the request even though it is not a mandatory field on the FHIR profile
Creating a new practitioner
- SFM checks if the FNR/DNR/HPR id is existing on a different practitioner. If another practitioner is found to exist on any of these ids SFM returns an error with the message: "Creating practitioner failed. The supplied identifier is already registered for a different practitioner."
- SFM performs a lookup in the HPR registry and creates the practitioner with the information returned.
- If no results are returned from the HPR registry, SFM uses the information supplied in the request object to create the practitioner.
Updating an existing practitioner
- In addition to the mandatory fields listed above, the FHIR id of the practitioner that should be updated needs to be included in the update request.
- SFM loads the existing practitioner by FHIR id. If no practitioner is found SFM returns an error with the message: "Resource is not known."
- After loading the existing practitioner by FHIR id, SFM checks if any of the supplied identifiers FNR/DNR/HPR exists on a different practitioner. If another practitioner is found SFM returns an error with the message: "Updating practitioner failed. The supplied identifier (FNR/DNR/HPR) is registered on a different practitioner."
- SFM performs a lookup in the HPR registry and updates the practitioner with the information returned.
- If no results are returned from the HPR registry, SFM uses the information supplied in the request to update the practitioner.
Input data that will not be store or validated
The following will not be validated or stored in SFM:
- photo
- qualification
- communication
- address
In HumanName the following will not be validated or stored:
- use
- text
- prefix
- sufix
- period
It is expected that EPJs update with current name.