コード例 #1
0
        public ProcedureDetail AddProcDetail(ProcedureDetail procdetails)
        {
            ProcedureDetail phy = _Procedures.FindAll().OrderBy(p => p.Proceduredetailsid).Last();

            procdetails._id = ObjectId.GenerateNewId().ToString();
            Int32 procdetid = phy.Proceduredetailsid + 1;

            procdetails.Proceduredetailsid = procdetid;
            if (procdetails.EncounterType == "P")
            {
                procdetails.EncounterType = "I,A";
            }
            _Procedures.Insert(procdetails);
            return(procdetails);
        }
コード例 #2
0
        public ProcedureDetail UpdatePatient(ProcedureDetail procdetail)
        {
            var session = HttpContext.Current.Session;

            if (session["UserId"] != null)
            {
                userId = session["UserId"].ToString();
            }
            ProcedureDetail procdet = repository.UpdatePatient(procdetail);
            EncounterReport erp     = new EncounterReport();

            erp.RefId     = procdet._id;
            erp.PatientId = procdet.UserId;
            erp.UpdateBy  = userId;
            erp.Action    = "update ProcedureDetail";
            var encreports = encrepo.AddEncReport(erp);

            return(procdet);
        }
コード例 #3
0
        public ProcedureDetail UpdatePatient(ProcedureDetail ProcDetails)
        {
            var procexist = GetByUserId(ProcDetails.UserId);

            if (ProcDetails.EncounterType == "P")
            {
                if (ProcDetails.UserId != "a8a56c1d-203c-4c53-9d95-972dec7a2ef5" || ProcDetails.UserId == "b6c625f5-653a-429f-b134-5b4d128ce4e8" || ProcDetails.UserId == "a24e6d62-414d-4434-bbe3-b3eec3a026e7")
                {
                    ProcDetails.EncounterType = "I,A";
                }
            }
            ProcedureDetail procde = procexist.Where(p => p._id == ProcDetails._id).First();

            procde.ProcedureName = ProcDetails.ProcedureName;
            procde.ProcedureDate = ProcDetails.ProcedureDate;
            procde.SNOMEDCT      = ProcDetails.SNOMEDCT;

            _Procedures.Save(procde);

            return(procde);
        }