public ActionResult SaveRequestClinicalReason(string reason, int requestID, int referralID)//, int requestID { RFARequest request = new RFARequest(); request.RFARequestID = requestID; request.RFAStatus = "Peer Review"; request.RFAClinicalReasonforDecision = reason; _iPreparationService.updateDecisionByRequestID(Mapper.Map <MMCService.PreparationService.RFARequest>(request)); return(Json(CheckClinicalReasonFilled(referralID))); }
public void AssignNewReferralToRequest() { RFARequest obj = new RFARequest() { RFAReferralID = 103, RFAStatus = null, RFARequestID = 77 }; var data = _intakeRepository.AssignNewReferralToRequest(obj); Assert.IsTrue(data > 0, "failed"); }
public void updateDecisionByRequestID() { RFARequest rfaRequest = new RFARequest(); rfaRequest.RFARequestID = 1168; rfaRequest.DecisionID = 9; rfaRequest.DecisionDate = System.DateTime.Now; //rfaRequest.RFAStatus = "SendT0Clinical"; rfaRequest.RFAFrequency = 2; rfaRequest.RFARequestedTreatment = "5435"; var _id = _IPreparationRepository.updateDecisionByRequestID(rfaRequest); Assert.IsTrue(_id != null, "failed"); }
public int updateDecisionByRequestID(RFARequest rfaRequest) { MMCDbContext mmcDBcontext = new MMCDbContext(); try { var qry = from p in mmcDBcontext.rfaRequests where p.RFARequestID == rfaRequest.RFARequestID select p; foreach (var q in qry) { q.DecisionID = rfaRequest.DecisionID; q.RFAStatus = rfaRequest.RFAStatus; q.RFANotes = rfaRequest.RFANotes; // q.RFARequestedTreatment = rfaRequest.RFARequestedTreatment; if (rfaRequest.DecisionID != 1) { q.RFAClinicalReasonforDecision = rfaRequest.RFAClinicalReasonforDecision; q.RFAGuidelinesUtilized = rfaRequest.RFAGuidelinesUtilized; q.RFARelevantPortionUtilized = rfaRequest.RFARelevantPortionUtilized; if (rfaRequest.RFAClinicalReasonforDecision != null) { SPImpl _spImpl = new SPImpl(); _spImpl.updateRFAReferralRequestRFAClinicalReasonforDecisionByID(q.RFAReferralID.Value, q.RFAClinicalReasonforDecision); } } else { q.RFAClinicalReasonforDecision = null; q.RFAGuidelinesUtilized = null; q.RFARelevantPortionUtilized = null; } q.DecisionDate = rfaRequest.DecisionDate; } mmcDBcontext.SaveChanges(); return(1); } catch { return(0); } }