Adding Actions on the Patient Summary
The patient summary page has extension points where you can add "Current Visit Actions" and "General Actions."
This extension points are part of the App Framework Module. For comprehensive background, see App Framework Developer Documentation.
To add a link to one of the extensions points, you would register an Extension with type=link that describes the link you want to add. In your module, you would create a .. extension.json file like
General Action example
[
{
"id": "yourmoduleid.some-unique-id",
"extensionPointId": "patientDashboard.overallActions",
"type": "link",
"label": "Link Text or yourmoduleid.message.code",
"url": "yourmoduleid/somepage.page?patientId={{patient.uuid}}",
"icon": "icon-search",
"order": 20, // a lower number is earlier
"requiredPrivilege": "Some required privilege like 'Task: coreapps.createVisit'"
}
]
Current Visit Action example
[
{
"id": "yourmoduleid.some-unique-id",
"extensionPointId": "patientDashboard.visitActions",
"type": "link",
"label": "Link Text or yourmoduleid.message.code",
"url": "yourmoduleid/somepage.page?patientId={{patient.uuid}}&visitId={{visit.uuid}}",
"icon": "icon-plus",
"order": 20, // a lower number is earlier
"requiredPrivilege": "Some required privilege like 'Task: coreapps.createVisit'",
"require": "visit.active" // if you also want this to show up for past visits in the Visit Dashboard, omit this
}
]
See also Conditionally displaying Apps and Extensions, if you only want the link displayed depending on some conditions.
Real-life examples:
General Action in the Chart Search module
Active Visit Action in the Reference Application module