# Lab Project Level 2 - HealthPay ## General Requirements <p> The project aims to build a system with 3 microservices that communicate with each other using gRPC. Two of the microservices will be refactored as part of the project. The system should also include message queuing and a centralized dashboard with facts and figures from different services using microfrontend. </p> #### Microservices Service 1: Patient-MS - Simple CRUD for Patient Service 2: Practitioner-MS - Simple CRUD for Practitioner Service 3: Clearinghouse-MS This service will pull billing and cost information from Service 1 and 2. - As Clearinghouse Manager, I should be able to see Dashboard with graph and figures. - Practitioner Count - Patient Count - Practitioner Service taken by Patient Count - Patient Services taken timeline - Billing amount for Patients ie Paid / ToPay - Transfer amount for Pratitioner is Paid/ToPay - As Clearinghouse Manager, I should be able to make payment for Patient and Practitioner. Payment methods will be CASH and CHEQUE. All the billing data should be stored in Clearinghouse MS Database #### Refactoring ##### Service 1: Patient-MS - As a patient Manager, I should be able to see the the services provided by a Practitioner with Name, Detail, and Cost. - As a patient Manager, I should be able to select the services from the Practitioner on a specific Date. No two services can be taken on a same date. - As a patient Manager, I should be able to see these services taken till date. ##### Service 2: Practitioner-MS - As a Practitioner Manager, I should be able to add services I provide for Patient (Name, Detail and Cost). - As a Practitioner Manager, I should be able to see list of services provided by Practitioner. - As a Practitioner Manager, I should be able to see list of Patient taking these services. ### Scope - The system will consist of three microservices: Service A, Service B, and Service C. - Service A and Service B will be refactored to expose gRPC APIs that Service C can call. - Service C will send messages to a message queue, which Service A and Service B will consume and process asynchronously. - The three microservices will be implemented in a programming language of the team's choice (e.g. Python, Java, Go). - Service A and Service B will store data in Snowflake as a database using SQL. - A centralized dashboard will be created using microfrontends from each of the three services, which will display facts and figures from the corresponding services. - An ETL process will be implemented to extract data from the three services, transform the data into a unified format, and load the transformed data into Snowflake for analysis and reporting. ## Application Constraints: - The message queue must support at-least-once delivery semantics. - The gRPC APIs must use Protocol Buffers for serialization. ## Application Deliverables: - Refactored source code for Service A and Service B. - Source code for Service C. - Unit tests for all three services. - Documentation on the design and implementation of the system, including instructions on how to set up and access the Snowflake instance and the ETL process. ## Application Acceptance Criteria: - Service A, Service B, and Service C are able to communicate with each other using gRPC and message queueing. - Data is properly persisted in Snowflake and can be retrieved by Service A and Service B. - The centralized dashboard displays facts and figures from all three services using microfrontends, implemented in JavaScript. - The ETL process extracts data from all three services, transforms the data into a unified format, and loads the transformed data into Snowflake as a database. The ETL process is implemented in JavaScript. - The message queue supports at-least-once delivery semantics. - The gRPC APIs use Protocol Buffers for serialization. - The source code is properly documented and easy to understand. - The unit tests have good code coverage. ## Your submission must include - Refactored source code for Service A and Service B. - Source code for Service C. - Unit tests for all three services. - Documentation on the design and implementation of the system, including instructions on how to set up and access the Snowflake instance and the ETL process. <hr /> ### References <a href="https://blog.sessionstack.com/implementation-of-grpc-in-a-nodejs-8ea8c4cdb9eb">Implementing gRPC in Node Application</a> <a href="https://medium.com/@tj.ruesch/getting-started-with-grpc-and-golang-45407211f04d">Implementing gRPC in Go Application</a> <a href="https://pamodaaw.medium.com/handson-introduction-to-grpc-with-java-1195870027fb">Implementing gRPC in Java Application</a>