In the case of a Cloud PMS system, one approach for an integration with MedImage is to run a single MedImage Cloud Server from the same Linux or Windows server as your Cloud PMS.

a) You create a custom button in your interface that does a MedImage app pairing for a user. If there is an existing ‘hash’ for the practice in your database you send that in the pairing request (which is a pairing script that exists on the MedImage hosted environment). It returns a 4 digit code for the user to enter on their app.

b) If there is no ‘hash’ for the practice in your database, you pass in a blank hash, and the pairing script will generate a hash for your practice. You save that hash in your practice’s record within your database.

Then, the single MedImage Server will store photos in this folder structure:

/18digit-practice-hash/patient-ID/photo.jpg

Note: This approach would work immediately with both the Standard messaging and Professional MedImage photo apps. 

Settings

In your MedImage Server config.json you would want these settings. They ensure that you can’t pair up another Medimage Server or access information over the web interface.

"allowPhotosLeaving": false,
"allowGettingRemotePhotos": false,
"lockDown": true,
"backupTo": [ "/your/secure/folder" ],

The ‘backupTo’ entry will be needed for two reasons:
a) it removes the photos from a potentially readable location (as the photo is moved into the 1st folder entry of the backupTo array, not copied)
b) the absence of the photo in the original location is the trigger for the Professional app to say that the photo has been transferred correctly.

Pairing Button

After your pairing button is pushed the remote call to the pairing server is e.g.

https://medimage-pair.atomjump.com/med-genid.php?guid=&proxyServer=https://yourserver.co.nz:5566

or, if the guid (globally unique hash ID) is known already, enter it as the guid parameter, e.g.

https://medimage-pair.atomjump.com/med-genid.php?guid=ZY6hytadcr9pRnhqyB&proxyServer=https://yourserver.co.nz:5566

This responds with plain text and a space between each field e.g.

VqR2 ZY6hytadcr9pRnhqyB https://yourserver.test:5566 %5BUnknown%20-%20private%5D

Translating the fields from the above line:

[A] [B] [C] [D]

[A] = a 4 digit user pairing code to display to the user
[B] = the 18 character guid to store in your database for use next time with that same practice
[C] = your own MedImage Server address and port
[D] = a text message for display purposes – this is only applicable for MedImage’s own cloud servers, so you can ignore this

Once this pairing is complete the apps will send data directly to your own MedImage Server, and will not touch the MedImage AJ servers further.

Notes

One thing to be careful around: the capitalisation of the patient folder (or the filename) section. It will be created as it was entered, so to keep this consistent, you may want to write a small MedImage add-on that capitalises (or lower-cases) all the letters.