Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,31 @@ public int updateBenFlowStatusAfterDoctorActivity(@Param("benFlowID") Long benFl

@Transactional
@Modifying
@Query("UPDATE BeneficiaryFlowStatus t set t.doctorFlag = :docFlag , t.pharmacist_flag = :pharmaFlag, "
+ " t.oncologist_flag = :oncologistFlag, t.consultationDate = now(), t.processed = 'U', "
+ " t.tCSpecialistUserID = :tcSpecialistUserID, t.tCRequestDate = :tcDate "
+ " WHERE t.benFlowID = :benFlowID AND " + " t.beneficiaryRegID = :benRegID AND t.beneficiaryID = :benID ")
@Query("UPDATE BeneficiaryFlowStatus t set t.doctorFlag = :docFlag, "
+ "t.pharmacist_flag = :pharmaFlag, t.doctorSignatureFlag = :signatureFlag, "
+ "t.oncologist_flag = :oncologistFlag, t.consultationDate = now(), t.processed = 'U', "
+ "t.tCSpecialistUserID = :tcSpecialistUserID, t.tCRequestDate = :tcDate "
+ "WHERE t.benFlowID = :benFlowID AND t.beneficiaryRegID = :benRegID AND t.beneficiaryID = :benID")
public int updateBenFlowStatusAfterDoctorActivityWDF(@Param("benFlowID") Long benFlowID,
@Param("benRegID") Long benRegID, @Param("benID") Long benID, @Param("docFlag") Short docFlag,
@Param("pharmaFlag") Short pharmaFlag, @Param("oncologistFlag") Short oncologistFlag,
@Param("tcSpecialistUserID") int tcSpecialistUserID,
@Param("tcDate") Timestamp tcDate);
@Param("benRegID") Long benRegID, @Param("benID") Long benID,
@Param("docFlag") Short docFlag, @Param("pharmaFlag") Short pharmaFlag,
@Param("oncologistFlag") Short oncologistFlag,
@Param("tcSpecialistUserID") int tcSpecialistUserID,
@Param("tcDate") Timestamp tcDate,
@Param("signatureFlag") Boolean signatureFlag);

@Transactional
@Modifying
@Query("UPDATE BeneficiaryFlowStatus t set t.pharmacist_flag = :pharmaFlag, "
+ " t.oncologist_flag = :oncologistFlag, t.processed = 'U', t.specialist_flag = :tcSpecialistFlag "
+ " WHERE t.benFlowID = :benFlowID AND t.beneficiaryRegID = :benRegID AND t.beneficiaryID = :benID ")
public int updateBenFlowStatusAfterDoctorActivityTCSpecialist(@Param("benFlowID") Long benFlowID,
@Param("benRegID") Long benRegID, @Param("benID") Long benID, @Param("pharmaFlag") Short pharmaFlag,
@Param("oncologistFlag") Short oncologistFlag, @Param("tcSpecialistFlag") Short tcSpecialistFlag);
@Transactional
@Modifying
@Query("UPDATE BeneficiaryFlowStatus t set t.pharmacist_flag = :pharmaFlag, "
+ "t.doctorSignatureFlag = :signatureFlag, "
+ "t.oncologist_flag = :oncologistFlag, t.processed = 'U', t.specialist_flag = :tcSpecialistFlag "
+ "WHERE t.benFlowID = :benFlowID AND t.beneficiaryRegID = :benRegID AND t.beneficiaryID = :benID")
public int updateBenFlowStatusAfterDoctorActivityTCSpecialist(@Param("benFlowID") Long benFlowID,
@Param("benRegID") Long benRegID, @Param("benID") Long benID,
@Param("pharmaFlag") Short pharmaFlag,
@Param("oncologistFlag") Short oncologistFlag,
@Param("tcSpecialistFlag") Short tcSpecialistFlag,
@Param("signatureFlag") Boolean signatureFlag);

@Transactional
@Modifying
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/iemr/mmu/service/anc/ANCServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,10 @@ public Long updateANCDoctorData(JsonObject requestOBJ, String Authorization) thr
Integer prescriptionSuccessFlag = null;
Long referSaveSuccessFlag = null;
Integer tcRequestStatusFlag = null;
Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
Expand Down Expand Up @@ -1626,7 +1630,7 @@ public Long updateANCDoctorData(JsonObject requestOBJ, String Authorization) thr

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = investigationSuccessFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ public int updateBenFlowAfterDocData(Long benFlowID, Long benRegID, Long benID,
}

public int updateBenFlowAfterDocDataUpdate(Long benFlowID, Long benRegID, Long benID, Long benVisitID,
short docFlag, short pharmaFlag, short oncologistFlag, short tcSpecialistFlag, int tcUserID,
Timestamp tcDate) throws Exception {
short docFlag, short pharmaFlag, short oncologistFlag, short tcSpecialistFlag,
int tcUserID, Timestamp tcDate, Boolean signatureFlag) throws Exception {
int i = 0;
try {
Short pharmaF = beneficiaryFlowStatusRepo.getPharmaFlag(benFlowID);
Expand All @@ -291,8 +291,8 @@ public int updateBenFlowAfterDocDataUpdate(Long benFlowID, Long benRegID, Long b
else
pharmaF1 = pharmaFlag;

i = beneficiaryFlowStatusRepo.updateBenFlowStatusAfterDoctorActivity(benFlowID, benRegID, benID, docFlag,
pharmaF1, oncologistFlag, tcSpecialistFlag, tcUserID, tcDate, false);
i = beneficiaryFlowStatusRepo.updateBenFlowStatusAfterDoctorActivity(benFlowID, benRegID, benID,
docFlag, pharmaF1, oncologistFlag, tcSpecialistFlag, tcUserID, tcDate, signatureFlag);
} catch (Exception e) {
logger.error("Error in ben flow creation = " + e);
throw new Exception(e);
Expand All @@ -302,7 +302,7 @@ public int updateBenFlowAfterDocDataUpdate(Long benFlowID, Long benRegID, Long b

public int updateBenFlowAfterDocDataUpdateWDF(Long benFlowID, Long benRegID, Long benID, Long benVisitID,
short docFlag, short pharmaFlag, short oncologistFlag, int tcUserID,
Timestamp tcDate) throws Exception {
Timestamp tcDate, Boolean signatureFlag) throws Exception {
int i = 0;
try {
Short pharmaF = beneficiaryFlowStatusRepo.getPharmaFlag(benFlowID);
Expand All @@ -313,8 +313,8 @@ public int updateBenFlowAfterDocDataUpdateWDF(Long benFlowID, Long benRegID, Lon
else
pharmaF1 = pharmaFlag;

i = beneficiaryFlowStatusRepo.updateBenFlowStatusAfterDoctorActivityWDF(benFlowID, benRegID, benID, docFlag,
pharmaF1, oncologistFlag, tcUserID, tcDate);
i = beneficiaryFlowStatusRepo.updateBenFlowStatusAfterDoctorActivityWDF(benFlowID, benRegID, benID,
docFlag, pharmaF1, oncologistFlag, tcUserID, tcDate, signatureFlag);
} catch (Exception e) {
logger.error("Error in ben flow creation = " + e);
throw new Exception(e);
Expand All @@ -323,8 +323,8 @@ public int updateBenFlowAfterDocDataUpdateWDF(Long benFlowID, Long benRegID, Lon
}

public int updateBenFlowAfterDocDataUpdateTCSpecialist(Long benFlowID, Long benRegID, Long benID, Long benVisitID,
short docFlag, short pharmaFlag, short oncologistFlag, short tcSpecialistFlag, int tcUserID,
Timestamp tcDate) throws Exception {
short docFlag, short pharmaFlag, short oncologistFlag, short tcSpecialistFlag,
int tcUserID, Timestamp tcDate, Boolean signatureFlag) throws Exception {
int i = 0;
try {
Short pharmaF = beneficiaryFlowStatusRepo.getPharmaFlag(benFlowID);
Expand All @@ -336,7 +336,7 @@ public int updateBenFlowAfterDocDataUpdateTCSpecialist(Long benFlowID, Long benR
pharmaF1 = pharmaFlag;

i = beneficiaryFlowStatusRepo.updateBenFlowStatusAfterDoctorActivityTCSpecialist(benFlowID, benRegID, benID,
pharmaF1, oncologistFlag, tcSpecialistFlag);
pharmaF1, oncologistFlag, tcSpecialistFlag, signatureFlag);
} catch (Exception e) {
logger.error("Error in ben flow creation = " + e);
throw new Exception(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,10 @@ public int updateBenFlowtableAfterDocDataSave(CommonUtilityClass commonUtilityCl
* @param isMedicinePrescribed
* @return
*/
public int updateBenFlowtableAfterDocDataUpdate(CommonUtilityClass commonUtilityClass, Boolean isTestPrescribed,
Boolean isMedicinePrescribed, TeleconsultationRequestOBJ tcRequestOBJ) throws Exception {
public int updateBenFlowtableAfterDocDataUpdate(CommonUtilityClass commonUtilityClass,
Boolean isTestPrescribed, Boolean isMedicinePrescribed,
TeleconsultationRequestOBJ tcRequestOBJ, Boolean doctorSignatureFlag) throws Exception {

int i = 0;
short pharmaFalg;
short docFlag = (short) 0;
Expand All @@ -852,7 +854,7 @@ public int updateBenFlowtableAfterDocDataUpdate(CommonUtilityClass commonUtility

i = commonBenStatusFlowServiceImpl.updateBenFlowAfterDocDataUpdateTCSpecialist(tmpBenFlowID,
tmpbeneficiaryRegID, tmpBeneficiaryID, tmpBenVisitID, docFlag, pharmaFalg, (short) 0,
tcSpecialistFlag, tcUserID, tcDate);
tcSpecialistFlag, tcUserID, tcDate, doctorSignatureFlag);
} else {

if (isTestPrescribed)
Expand Down Expand Up @@ -880,13 +882,13 @@ public int updateBenFlowtableAfterDocDataUpdate(CommonUtilityClass commonUtility
tcSpecialistFlag = (short) 100;
i = commonBenStatusFlowServiceImpl.updateBenFlowAfterDocDataUpdate(tmpBenFlowID, tmpbeneficiaryRegID,
tmpBeneficiaryID, tmpBenVisitID, docFlag, pharmaFalg, (short) 0, tcSpecialistFlag, tcUserID,
tcDate);
tcDate, doctorSignatureFlag);
}

else
i = commonBenStatusFlowServiceImpl.updateBenFlowAfterDocDataUpdateWDF(tmpBenFlowID, tmpbeneficiaryRegID,
tmpBeneficiaryID, tmpBenVisitID, docFlag, pharmaFalg, (short) 0, tcUserID,
tcDate);
tcDate, doctorSignatureFlag);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ public Long updateCovid19DoctorData(JsonObject requestOBJ, String Authorization)
Integer prescriptionSuccessFlag = null;
Long referSaveSuccessFlag = null;

Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
// TcSpecialistSlotBookingRequestOBJ tcSpecialistSlotBookingRequestOBJ = null;
Expand Down Expand Up @@ -962,7 +967,7 @@ public Long updateCovid19DoctorData(JsonObject requestOBJ, String Authorization)

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0)
updateSuccessFlag = investigationSuccessFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,10 @@ public Long updateGeneralOPDDoctorData(JsonObject requestOBJ, String Authorizati
Integer prescriptionSuccessFlag = null;
Long referSaveSuccessFlag = null;
Integer tcRequestStatusFlag = null;
Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
Expand Down Expand Up @@ -1584,7 +1588,7 @@ public Long updateGeneralOPDDoctorData(JsonObject requestOBJ, String Authorizati

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = investigationSuccessFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,11 @@ public Long updateNCDCareDoctorData(JsonObject requestOBJ, String Authorization)
Long referSaveSuccessFlag = null;
Integer tcRequestStatusFlag = null;

Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
TcSpecialistSlotBookingRequestOBJ tcSpecialistSlotBookingRequestOBJ = null;
Expand Down Expand Up @@ -1295,7 +1300,7 @@ public Long updateNCDCareDoctorData(JsonObject requestOBJ, String Authorization)

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = investigationSuccessFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public int updateDoctorData(JsonObject requestOBJ) throws Exception {
Long referSaveSuccessFlag = null;
// Integer tcRequestStatusFlag = null;

Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
// TcSpecialistSlotBookingRequestOBJ tcSpecialistSlotBookingRequestOBJ = null;
Expand Down Expand Up @@ -240,7 +245,7 @@ public int updateDoctorData(JsonObject requestOBJ) throws Exception {

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = 1;
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/iemr/mmu/service/pnc/PNCServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,11 @@ public Long updatePNCDoctorData(JsonObject requestOBJ, String Authorization) thr
Long referSaveSuccessFlag = null;
Integer tcRequestStatusFlag = null;

Boolean doctorSignatureFlag = false;
if (requestOBJ.has("doctorSignatureFlag") && !requestOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = requestOBJ.get("doctorSignatureFlag").getAsBoolean();
}

if (requestOBJ != null) {
TeleconsultationRequestOBJ tcRequestOBJ = null;
TcSpecialistSlotBookingRequestOBJ tcSpecialistSlotBookingRequestOBJ = null;
Expand Down Expand Up @@ -1580,7 +1585,7 @@ public Long updatePNCDoctorData(JsonObject requestOBJ, String Authorization) thr

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass,
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ);
isTestPrescribed, isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = investigationSuccessFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,12 @@ public Long updateGeneralOPDQCDoctorData(JsonObject quickConsultDoctorOBJ, Strin
Long referupdateSuccessFlag = null;
Integer tcRequestStatusFlag = null;

Boolean doctorSignatureFlag = false;
if (quickConsultDoctorOBJ.has("doctorSignatureFlag")
&& !quickConsultDoctorOBJ.get("doctorSignatureFlag").isJsonNull()) {
doctorSignatureFlag = quickConsultDoctorOBJ.get("doctorSignatureFlag").getAsBoolean();
}

TeleconsultationRequestOBJ tcRequestOBJ = null;
TcSpecialistSlotBookingRequestOBJ tcSpecialistSlotBookingRequestOBJ = null;
CommonUtilityClass commonUtilityClass = InputMapper.gson().fromJson(quickConsultDoctorOBJ,
Expand Down Expand Up @@ -711,7 +717,7 @@ public Long updateGeneralOPDQCDoctorData(JsonObject quickConsultDoctorOBJ, Strin

// call method to update beneficiary flow table
int i = commonDoctorServiceImpl.updateBenFlowtableAfterDocDataUpdate(commonUtilityClass, isTestPrescribed,
isMedicinePrescribed, tcRequestOBJ);
isMedicinePrescribed, tcRequestOBJ, doctorSignatureFlag);

if (i > 0) {
updateSuccessFlag = benChiefComplaintID;
Expand Down
Loading