Skip to content

Conversation

@rahu1ramesh
Copy link
Contributor

JIRA -> BN-64

This PR adds functionality to capture and save basic encounter information via the FHIR /openmrs/ws/fhir2/R4/ConsultationBundle API using a new Action Workstation interface.


Key Features

  • Adds + New Visit button to trigger encounter workflow.
  • Builds a responsive Action Workstation shell for capturing consultation data.
  • Saves encounter using the ConsultationBundle FHIR API.
  • Displays success and error notifications on form submission.

Implementation Details

  • New Visit Button: Triggers the Action Workstation UI when clicked.

  • Action Workstation: Responsive UI built with Carbon Design components; mobile-optimized.

  • FHIR Integration:

    • Saves encounter via ConsultationBundle POST API.
    • Uses active visit or defaults to defaultVisitType from configuration.
    • Sets encounter type to Consultation.
    • Uses logged-in provider and location (from bahmni.user.location cookie).
  • Carbon Components: Re-used Carbon dropdowns for consistency and accessibility.

  • Notifications: Refactored to use Carbon's toast notifications for both success and error states.

  • API Integration:

    • Fetches practitioner UUID, encounter UUID, visit type, and location as required.
  • Error Handling: Shows user-friendly error messages on API failure.


Testing & Type Definitions

  • Includes unit tests for core logic and UI states.
  • TypeScript types defined for encounter and configuration data models.

Next Steps

A separate card will be created to support displaying saved encounter details in the dashboard and integrating it with other clinical workflows.

@rahu1ramesh rahu1ramesh requested a review from mohan-13 May 19, 2025 11:02
@rahu1ramesh rahu1ramesh merged commit 80283ee into main May 19, 2025
2 checks passed
@rahu1ramesh rahu1ramesh deleted the BN-64 branch May 19, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants