예제 #1
0
        public async Task <IActionResult> SaveData([FromBody] SaveDataInput input)
        {
            var entity = _mapper.Map <DialysisObservationEntity>(input);
            await _dialysisObservationApp.InsertForm(entity, input.VisitId);

            return(Success("操作成功。"));
        }
예제 #2
0
        public async Task <IActionResult> SubmitData([FromBody] SubmitDataInput input)
        {
            var visit = await _patVisitApp.GetForm(input.id);

            if (visit == null)
            {
                return(BadRequest("治疗单主键有误"));
            }
            var user = await _usersService.GetCurrentUserAsync();

            var entity = new DialysisObservationEntity
            {
                F_Id                = Common.GuId(),
                F_Pid               = visit.F_Pid,
                F_VisitDate         = visit.F_VisitDate,
                F_VisitNo           = visit.F_VisitNo,
                F_SSY               = input.ssy,
                F_SZY               = input.szy,
                F_HR                = input.hr,
                F_A                 = input.a,
                F_BF                = input.bf,
                F_UFR               = input.ufr,
                F_V                 = input.v,
                F_C                 = input.c,
                F_T                 = input.t,
                F_UFV               = input.ufv,
                F_TMP               = input.tmp,
                F_GSL               = input.gsl,
                F_MEMO              = input.memo,
                F_Nurse             = user.F_RealName,
                F_NurseOperatorTime = input.operatorTime,
                F_EnabledMark       = true,
                F_CreatorTime       = DateTime.Now,
                F_CreatorUserId     = user.F_Id,
            };
            await _dialysisObservationApp.InsertForm(entity);

            var data = new
            {
                id = entity.F_Id
            };

            return(Ok(data));
        }