Export data from FM
EHR previously running FM may export data from FM to the dedicated SFM migration format. The encryption of data is relying on a dedicated certificate available from Adresseregisteret under Norsk Helsenett SF: SFM migrering
When the (encryption) certificate is properly installed, the FM export program may be started. Login is same as in FM-Admin:
The export client will ask for the file path and the certificate to use:
Exported data files
The files from FM export consist of different types
- organizational data, only one file. Contains organizational information, user info (healtcare and admin, local medication registration etc.)
- Patient data. Several files in a structure. One file per patient, containing treatments, prescriptions, GP info, allergies.
- Reports. Several files in a structure. Contains unstructured data in pdf, referring to particular patients.
- Index. Contains the relative path to all the patient files to upload.
Import data to SFM
Using the available application SFMUploader the FM data may now be transferred to SFM Migration API. The SFM uploader starts as a command line program with the access token as parameter. It is wise to have this integrated into the EHR support module, doing a proper login and retrieve the bearer token with scope SFM migrering.
After successfully starting the SFMUploader it asks for the folder to select (mappe). The button Start opplasting starts the upload. SFMUploader will record what files are successfully uploaded, and may be restarted in case of errors. SFM will require a valid token when upload starts, but will accept uploading process to last for a few hours beyond the token expiration.
Upload result
When upload is finished, the program writes a report to the folder (extension .ledger`). The log shall be inspected for result.
Extract of a ledger file from test:
{ "importFiles": [ { "FileNameWithRelativePath": "ExportData.dat", "FileName": "ExportData.dat", "FileType": "organizationFile", "Status": "completed", "RemoteUrl": "https://dataimport.test1.forskrivning.no/files/b10d8941cd7046238ca775de7202c5f1", "WhenAddedToLedger": "2021-11-24T13:57:07.7269042+01:00", "WhenModified": "2021-11-24T13:57:10.2266578+01:00" }, { "FileNameWithRelativePath": "Patients0\\0e7bfd89-ff43-4c5a-a9e2-1af46ae33672.pat", "FileName": "0e7bfd89-ff43-4c5a-a9e2-1af46ae33672.pat", "FileType": "patientFile", "Status": "completed", "RemoteUrl": "https://dataimport.test1.forskrivning.no/files/e8c90c2ae60147d899b4e9dfb3191573", "WhenAddedToLedger": "2021-11-24T13:57:07.7269042+01:00", "WhenModified": "2021-11-24T13:57:14.5703967+01:00" }, /*...more entries....*/ ], "ImportSession": "3dbc159d-1d6e-4a83-b5ad-2dad31f8bb40" }
Mirgration result
Successful upload doesn't guarantee successful import. SFM will handle the uploaded data asynchronously, and will generate a report when requested in SFM Datashare API.