예제 #1
0
        public void CreateRequestTest()
        {
            string             identityCard       = RandomHelper.GenerateString();
            string             patientNo1         = RandomHelper.GenerateString();
            string             patientNo2         = RandomHelper.GenerateString();
            PatientCaseInfoDto patientCaseInfoDto = new PatientCaseInfoDto
            {
                IdentityCard    = identityCard,
                PatientName     = RandomHelper.GenerateString(),
                InsuranceNumber = RandomHelper.GenerateString(),
                PatientNo       = patientNo1,
                Age             = RandomHelper.GenerateString(),
                Gender          = "0",
                Birthday        = DateTime.Now,
                CreateTime      = DateTime.Now,
                LastEditTime    = DateTime.Now
            };

            PatientCaseInfoDto patientCaseInfoDtoNew = ConsultationPatientCaseService.CreatePatientCase(patientCaseInfoDto, null, "", "");

            NewConsultationRequestDto newConsultationRequestDto = new NewConsultationRequestDto
            {
                ConsultationType   = "0",
                ExpectedDate       = DateTime.Now,
                ExpectedTimeRange  = "0",
                PatientCaseID      = patientCaseInfoDtoNew.UniqueID,
                RequestPurpose     = RandomHelper.GenerateString(),
                RequestRequirement = RandomHelper.GenerateString(),
                SelectHospital     = "1"
            };

            string result = ConsultationService.CreateRequest(newConsultationRequestDto, "", "");

            Assert.IsNotNull(result);
        }
예제 #2
0
        public IHttpActionResult CreateRequest([FromBody] NewConsultationRequestDto newRequest)
        {
            var user   = base.CurrentUser();
            var result = _consultationService.CreateRequest(newRequest, user.Language, user.UniqueID);

            return(Ok(result));
        }