|
The VIP type/category was never included in the Kafka PATIENT_VIP event — only the boolean isVip flag was transmitted. Additionally, the Clinical Common Services (CCS) had no Kafka listener at all for patient VIP events.
|
|
|
|
Changes Made
|
|
1. HATI-EHR-Core-Service (MedCare side — VIP source)
|
|
UpdateVIPdto — Added vipType (String) and vipDescription (String) fields
|
|
PatientServiceImpl.updateVip() — Now fetches PatientAttributes to get the VipCategory.name → vipType and VipCategory.description → vipDescription, and includes them in the Kafka event
|
|
PatientManagementServiceImpl.publishPatientVipEvent() — Same enhancement, includes VIP category data in the event
|
|
Added IPatientAttributesRepository autowiring to both service implementations
|
|
|
|
2. HATI-EHR-Clinical-Common-Services (Clinicare — Consultation Q)
|
|
GeneralPatientDetails (MongoDB embedded model) — Added vipType and vipDescription fields
|
|
PatientDetailDTO (incoming from Appointment Service) — Added vipType and vipDescription
|
|
PatientDetails (outgoing API response) — Added vipType and vipDescription
|
|
KafkaTopics — Added LT_CORE_PATIENT_EVENTS = "lt.core.patient.events" constant
|
|
New: UpdateVIPdto — Created DTO matching Core Service's new format (patientId, isVip, vipType, vipDescription)
|
|
New: PatientEventType enum — Created with PATIENT_VIP, PATIENT_REGISTRATION, UPDATE_BASIC_DETAILS
|
|
New: KafkaPatientEventsDTO — Created to deserialize Core Service's patient event Kafka messages
|
|
ClinicalConductService interface — Added updatePatientVip(UpdateVIPdto) method
|
|
ClinicalConductServiceImpl.updatePatientVip() — Implemented: updates isVip, vipType, vipDescription for all matching patient dashboard events in MongoDB
|
|
ClinicalConductServiceImpl.saveClinicalAdmission() — Now maps vipType and vipDescription from incoming DTO when creating a dashboard
|
|
ConsumerService — Added new @KafkaListener for lt.core.patient.events topic that handles PATIENT_VIP events
|
|
|
|
3. HATI-EHR-Appointment-Service (appointment booking)
|
|
PatientDetailDTO — Added vipType and vipDescription fields
|
|
AppointmentServiceImpl — Now sets patient.setIsVip(appointment.getIsVip()) when building the clinical dashboard Kafka event
|
|
|
|
4. HATI-EHR-Clinical-Service (IPD/OPD Clinical Service)
|
|
UpdateVIPdto — Added vipType and vipDescription
|
|
PatientDetailDTO (dashboard) — Added vipType and vipDescription
|
|
GeneralPatientDetails (value object) — Added vipType and vipDescription
|
|
PatientDetails and MedPatientDetails — Added vipType and vipDescription
|
|
AdmissionDashboardServiceImpl.updatePatientVip() — Now updates vipType and vipDescription
|
|
AdmissionDashboardServiceImpl — Both locations that set isVip now also set vipType/vipDescription
|
|
|
|
5. HATI-EHR-IPD-Clinical-Service (IPD Clinical Service)
|
|
UpdateVIPdto — Added vipType and vipDescription
|
|
MedPatientDetails — Added vipRemark field (IPD uses vipRemark convention)
|
|
AdmissionDashboardServiceImpl.updatePatientVip() — Now calls setVipRemark(updateVIPdto.getVipType()) when updating VIP status
|