Esempio n. 1
0
        public int updateRFARequest(BLModel.RFARequest _rfaRequest)
        {
            DLModel.RFARequest _rfaRequestDL = Mapper.Map <DLModel.RFARequest>(_rfaRequest);
            _rfaRequestDL.RFARequestDate   = System.DateTime.Now;
            _rfaRequestDL.RFALatestDueDate = GetDueDate(_rfaRequest.RequestTypeID.Value, _rfaRequestDL.RFARequestDate.Value);
            //_rfaRequestRepo.Update(_rfaRequestDL);
            _rfaRequestRepo.Update(_rfaRequestDL, hp => hp.RFAReferralID, hp => hp.RequestTypeID, hp => hp.RFARequestedTreatment, hp => hp.TreatmentCategoryID, hp => hp.TreatmentTypeID, hp => hp.RFAFrequency, hp => hp.RFADuration, hp => hp.RFADurationTypeID, hp => hp.RFAQuantity);

            RFARequestModify _rFARequestModify = _rfaRequestModifyRepo.GetAll(rk => rk.RFARequestID == _rfaRequestDL.RFARequestID).SingleOrDefault();

            if (_rFARequestModify != null)
            {
                _rFARequestModify.RFARequestedTreatment = _rfaRequestDL.RFARequestedTreatment;
                _rfaRequestModifyRepo.Update(_rFARequestModify);
            }
            int _RFARequestID = _rfaRequest.RFARequestID;

            _rfaReferralCPTCodeRepo.Delete(req => req.RFARequestID == _RFARequestID);

            if ((_rfaRequest.RFACPT_NDC != null) && (_rfaRequest.RFACPT_NDC != ""))
            {
                if (_rfaRequest.RFACPT_NDC.Trim().Contains(","))
                {
                    string[] arrcptndcodes;
                    arrcptndcodes = _rfaRequest.RFACPT_NDC.Split(',');
                    foreach (var _arrcptndcodes in arrcptndcodes)
                    {
                        if (_arrcptndcodes.ToString() != "")
                        {
                            DLModel.RFARequestCPTCode _RFARequestCPTCode = new DLModel.RFARequestCPTCode();
                            _RFARequestCPTCode.RFARequestID = _RFARequestID;
                            _RFARequestCPTCode.CPT_NDCCode  = _arrcptndcodes.ToString();
                            addRFARequestCPTCode(_RFARequestCPTCode);
                        }
                    }
                }
                else
                {
                    DLModel.RFARequestCPTCode _RFARequestCPTCode = new DLModel.RFARequestCPTCode();
                    _RFARequestCPTCode.RFARequestID = _RFARequestID;
                    _RFARequestCPTCode.CPT_NDCCode  = _rfaRequest.RFACPT_NDC.ToString().Trim();
                    addRFARequestCPTCode(_RFARequestCPTCode);
                }
            }
            // UpdateRFAReqCertificationNumberByID
            //SPImpl _SPImpl = new SPImpl();
            //_SPImpl.UpdateRFAReqCertificationNumberByID(_RFARequestID);
            return(_RFARequestID);
        }
Esempio n. 2
0
        public int addRFARequest(BLModel.RFARequest _rfaRequest)
        {
            DLModel.RFARequest _rfaRequestDL = Mapper.Map <DLModel.RFARequest>(_rfaRequest);
            _rfaRequestDL.RFARequestDate   = System.DateTime.Now;
            _rfaRequestDL.RFALatestDueDate = GetDueDate(_rfaRequest.RequestTypeID.Value, _rfaRequestDL.RFARequestDate.Value);
            int _RFARequestID = _rfaRequestRepo.Add(_rfaRequestDL).RFARequestID;

            if ((_rfaRequest.RFACPT_NDC != null) && (_rfaRequest.RFACPT_NDC != ""))
            {
                if (_rfaRequest.RFACPT_NDC.Trim().Contains(","))
                {
                    string[] arrcptndcodes;
                    arrcptndcodes = _rfaRequest.RFACPT_NDC.Split(',');
                    foreach (var _arrcptndcodes in arrcptndcodes)
                    {
                        if (_arrcptndcodes.ToString() != "")
                        {
                            DLModel.RFARequestCPTCode _RFARequestCPTCode = new DLModel.RFARequestCPTCode();
                            _RFARequestCPTCode.RFARequestID = _RFARequestID;
                            _RFARequestCPTCode.CPT_NDCCode  = _arrcptndcodes.ToString();
                            addRFARequestCPTCode(_RFARequestCPTCode);
                        }
                    }
                }
                else
                {
                    DLModel.RFARequestCPTCode _RFARequestCPTCode = new DLModel.RFARequestCPTCode();
                    _RFARequestCPTCode.RFARequestID = _RFARequestID;
                    _RFARequestCPTCode.CPT_NDCCode  = _rfaRequest.RFACPT_NDC.ToString().Trim();
                    addRFARequestCPTCode(_RFARequestCPTCode);
                }
            }
            //UpdateRFAReqCertificationNumberByID
            // SPImpl _SPImpl = new SPImpl();
            // _SPImpl.UpdateRFAReqCertificationNumberByID(_RFARequestID);
            return(_RFARequestID);
        }
Esempio n. 3
0
 public int updateRFARequestAndDecision(DLModel.RFARequest _rfaRequest)
 {
     return(_rfaRequestRepo.Update(_rfaRequest, hp => hp.RFAReferralID, hp => hp.RFAStatus, hp => hp.RFARequestedTreatment, hp => hp.RFAClinicalReasonforDecision, hp => hp.RFAGuidelinesUtilized, hp => hp.RFARelevantPortionUtilized, hp => hp.RFANotes, hp => hp.RFAFrequency, hp => hp.RFADuration, hp => hp.RFADurationTypeID, hp => hp.DecisionDate));
 }
Esempio n. 4
0
 public int AssignNewReferralToRequest(DLModel.RFARequest _rfaRequest)
 {
     return(_rfaRequestRepo.Update(_rfaRequest, hp => hp.RFAReferralID, hp => hp.RFAStatus, hp => hp.DecisionDate));
 }