Summary
It may be desirable to interact with a certain device interface to test or demonstrate various workflows, but one may not always have access to a physical device or (related) software components. In order to alleviate the device dependencies, the ClinSpark Agent offers the ability to interact with ‘mock’ device profiles for testing and demonstration purposes.
Mock device profiles rely on the presence of certain ‘mock’ data files in a user’s default home directory. When the mock device is invoked through the ClinSpark interface, the Agent will pass through data from the local mock data files into ClinSpark.
Note: The use of mock devices is not suitable for testing study designs and form configurations in any production-like setting. Real (non-mock) device profiles intended for study use should always be used.
Prerequisites
A directory called ‘clinsparkdevice’ must be available in the active Windows user default home directory.
This typically is in the following path: «root»\Users\«username»
Alternately, the home directory can be located using the Windows environment variable ‘%USERPROFILE%’
Note that in the following screenshot, the Windows user name is ‘alex’. The directory is C:\Users\alex\clinsparkdevice
Additionally, the mock device files must be present in the ‘clinsparkdevice’ directory. These files contain device parameters and values to be passed through when invoking the device in ClinSpark.
Users can select specific device files to use based on their mock device needs, or, place all available files into the directory.
Download all device files here:
ClinSpark Device Configurations
The ClinSpark Agent looks for specifically named ‘mock’ device profile configurations coming from ClinSpark.
Some ClinSpark instances may come pre-configured with the following mock profiles:
Mock ECG Device
Mock Interval Container
Mock Vitals Device
Mock Chroma Meter
Mock EasyConnect
If these are not present, it’s possible that they are archived and not visible to regular users. A Foundry Health ‘superadmin’ user must otherwise enable/add these as new EDC Device profiles upon request.
All of mock device profiles can be reviewed within the Devices > Configure component.
Chroma Meter
A mock chroma meter device profile can quickly be created by changing the name of the existing ‘Konica Chroma Meter’ device profile to ‘Mock Chroma Meter’. Additionally, a new ‘Mock Chroma Meter’ EDC profile can be created with matching device parameters. This must be done by a Foundry Health ‘superadmin’ user.
Note: changing the name of an existing Chroma Meter device profile may cause undesirable results depending on the environment and use of that device. This is NOT recommended for PROD environments.
Modifying File Input Parameters
The mock device files located in the user home directory folder ‘clinsparkdevice’ contain input parameters the ClinSpark agent pulls from. To test various scenarios and workflows, it may be necessary to modify these values.
Most of the files can be opened and modified using any standard text editor.
Using Mock Devices
To test forms using mock devices, they must be built leveraging the mock device profiles. Mock device forms otherwise follow the same design conventions of regular device integration forms.
Within the forms library, a simple device integration form can be created with a mock device.
Interaction with mock device forms will be similar as when using a real device.
Clicking on the ‘Invoke Device’ button on the form will initiate the process to for the ClinSpark Agent to pull and return the values from the mock device files.
In the screenshot below, the values present in the mock vitals device file are populated into the mock vitals device form.