Concept of self service

SFM is built in a way that you (vendor support) may represent you customer as a "superuser" in the system and set up the initial SFM instance.

Before doing anything towards SFM you will need:

  • An organization to play with in test (with corresponding organization number(s)): Might be you own orgnaziation/company, an associated customer, or a fictuous organization. NHN might help with this (kundesenter)
  • HelseID setup for you client system with proper registering of SFM API use. Two differnet alternatives: Single- and multi tenant. Read more about this in the HelseID pages.
    • jounral-id or SFM-id must be provided, included in single-tenancy configuration, but you must provide your own functionality for multi tenant.
  • Registration in Adresseregisteret, neccessary to provide e-resept/e-prescription access.

NHN has set up differnet environments in test, and you should confer with you contact in the approval process to determine what endpoint group to use. (test1, test2, testx...)

When everything in place, including the ability to retreive an access token with the sfm-api scope and journa-id/SFM-id and user login at level high, you may create a SFM instance. Detailed walkthroug presented in "create new instance in SFM.

General adivice for both testing and production:

  • use the new access token towards the FHIR endpoint (SFM Full as well as SFM Basis) and do a search(GET) operation on the Organization endpoin to verify the expected result of not finding anything
  • use the new access token towards the FHIR endpoint an do a Create (POST) operation with proper http headers and a FHIR payload with Organization profiled as sfm-Organization with the following properties:

information needed for the Organization

- Organization.name
- Organization.Identifier[SFM-id] : matching the journal-id or SFM-id in token
- Organization.Identifier[ENH] : Organization matching the orgn_child in token if present, else the orgnr_parent
- Organization.Identifier[HERid] : Her id registered in Adresseregisteret for use in e-resept
- Organization.Type from the system: https://simplifier.net/r4medication/sfm-type-of-organization 
- Organization.telecom with a simple dummy phone number in test
- Organization.address with a simle dummy address in test
- Organization.extension.epjinfo shall be populated with info suitable for reporting to Reseptformidleren. Reseptformidleren will **reject the registration with an unknown systeminfo.systemcode**
- Organization.active = false: for now.

The operation takes some time to process as a new db-scheme is created at everthing is set up in SFM before you get 2xx code and the organziation structure in response. The new ID for this Organization is represented in the Location header.

You may now try to read back from Organzation and verify that you get at bundle back with your Organization, now given an ID. You may also try to read back from Person and verify that you are identified as an empty Person with your identifier. Note that in production we require that the next step is to update this Person instance with the correct name.