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 different client patterns: Single- and multi tenant.

    • journal-id or SFM-id must be provided. This is included in single-tenancy configuration, but you must provide your own functionality for multi tenant.
  • Registration in Adresseregisteret, necessary 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 retrieve 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 walk through presented in "How to create a new instance in SFM.

Test and developement vs. production

There are some important differences between test and production you as a developer should have in mind:

  • In test, NHN will give you access to pre-configured environment if you want. You will be able to access this by using test tools provide by NHN. Use this only for initial investigation, and set up your own instance as soon as possible.

  • First of all, you will need to set up a simulated customer. You will need a registry in Bedriftsregisteret to simulate a healtcare unit, and make sure it is available in Kjernejournal as well as Reseptformidleren. Relevant business category (næringskode) shoudl be selected.

  • If you are new to e-resept, you will need a pre-registered Systemcode granted from Godkjenningsprosessen e-resept. The code will be registered in Reseptformilderen test, and will be propagated to production on the approval.

  • You will need one or a set of Practitioners, having adequat proffessions registered in Helsepersonellregisteret (HRP). To be able to use e-resept ensure that at least one of them has prescription rights. SFM team will provide practitioners.

  • Similarly, you will need a set of patients. We strongly advise not to use good old test patients from the KITH list. SFM team provides test persons based on your needs.

  • HeslseID: Your system must be defined in HelseID selvbetjening as a Client system (Klientsystem), as consuming SFM Api. If you choose to provide multi tenancy, this client defines everythig in HelseID, including definition of "Tenants". If you choose single tenancy, separate clients will be defined for each customer.

  • In test the SFM team may support a "delete everything", useful in initial testing, especially i migration goes wrong.

Build good support into your system

Using test tools and direct access to API's are valuable in initial testing. Reproduction of errors by SFM team reqires precise information on endpoints, payloads and timestamps that are generally availabe in test. Do consider building good functions for this into your application from start, as this shows valuable for production support later. Including, but not limited to:

  • log of payload for request and response, header information including access token and timestamp for operations on: Organziation and Practitioner
  • posibillity to turn on similar also for Patient by configuration switch.