Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Now that we have a basic display in-place, we need to access the backend data.
To do so, we'll make use of built-in Mashup Data Services.
At the bottom-right of the pop-up, click Done.
Now that we have access to the Data Service within the Mashup, we'll use it to pull backend data into the Mashup (specifically, the aggregated Info Table Property), and then bind it to the Grid Widget.
Because we selected the Execute on Load option for GetProperties(), the Service will grab the information from the aggregated Info Table Property and propagate that into the Grid Advanced Widget on initially opening the Mashup in a web browser.
However, we currently have no way to call our custom aggregation Service besides diving into the backend as we did when we first created it and performed testing.
Instead, we want the Mashup itself to have the ability to call the aggregation Service.
We'll do so via the Button Widget's Clicked Event, but we first need to gain access to our custom Service in the Mashup.
In the top-right Data tab beside Things_MDSD_Thing, click the green </> button.
On the left of the Add Data Pop-up, expand Select Service Category, and choose **Uncategorized**.
Beside MDSD_Aggregation_Service, click the right arrow to add it to the Selected Services section.
At the bottom-right, click Done.
Now that we can reference the aggregation Service in the Mashup, we'll bind it to pressing the Button Widget.
Our MVP MRI Service Application is now complete.
Let's test it.
At the top, click View Mashup.
Each time that you press the Button Widget, what you're really doing is calling our custom aggregation Service in the Foundation backend.
This Service then goes out and pulls in information from our various EMS-connected Edge sub-systems.
To add additional sub-systems (maybe a "friction" detection on the patient-bed indicating that it needs additional grease) all you would have to do is repeat the steps in this Learning Path, i.e. connect the additional sub-system with the EMS, add another Field Definition to the Data Shape, and modify the aggregation Service to retrieve that info and store it in the Info Table Property.
In addition, you may wish to improve the GUI. Rather than using a Positioning: Static Mashup, you could utilize a Responsive setup, sub-divide the Canvas into various sections, and then add items such as your company's logo. This would also make the GUI more friendly to different screen resolutions.
You can even add business logic to the Mashup itself. For instance, the Auto Refresh Widget (Legacy) can effectively be used as a "timer". In the same way that the Button Widget's Clicked Event calls the aggregation Service, the Auto Refresh Widget could be used to trigger the Service call at a set interval. Then, as long as the Mashup was open, the Button Widget would only be needed when you wanted an immediate status update.
For more information on implementing additional business logic, refer to the Create Custom Business Logic guide.
Or the Time Selector Widget could be used to restrict the information in the Grid Widget to only the timeframe you wanted to investigate.
Congratulations! You've successfully completed the Medical Data Storage and Display guide, and learned how to:
This is the last guide in the Medical Device Service learning path.
We recommend the following resources to continue your learning experience:
Capability Guide
Build | Methods for Data Storage |
Experience | Create Your Application UI |
If you have questions, issues, or need additional information, refer to:
Resource Link
Community | Developer Community Forum |
Support | ThingWorx Help Center |