コード例 #1
0
        public IActionResult Save([FromBody] PatientDemographics viewModel)
        {
            var request  = new RestRequest(URL_PATH, Method.POST);
            var response = _restClient.Execute <PatientDemographics>(request);

            if (response.ErrorException != null)
            {
                throw response.ErrorException;
            }

            return(View());
        }
コード例 #2
0
        public bool Update(int id, PatientDemographics updatePatientDemographics)
        {
            var validateResult = _validate.Validate(updatePatientDemographics);

            if (!validateResult.IsValid)
            {
                throw new Exception("Validation Errors");
            }

            var save = _mapper.Map <PatientDemographics, PatientDemographicsDto>(updatePatientDemographics);

            return(_repo.Update(id, save));
        }
コード例 #3
0
        public int Save(PatientDemographics newPatientDemographics)
        {
            var validateResult = _validate.Validate(newPatientDemographics);

            if (!validateResult.IsValid)
            {
                throw new Exception("Validation Errors");
            }

            var save = _mapper.Map <PatientDemographics, PatientDemographicsDto>(newPatientDemographics);

            return(_repo.Save(save));
        }
コード例 #4
0
        public IActionResult Update(int id, [FromBody] PatientDemographics viewModel)
        {
            var request = new RestRequest(URL_PATH + "/" + id, Method.PUT);

            request.AddUrlSegment("Id", id);
            var response = _restClient.Execute <PatientDemographics>(request);

            if (response.ErrorException != null)
            {
                throw response.ErrorException;
            }
            return(View());
        }
コード例 #5
0
ファイル: EpicAPI.cs プロジェクト: IntelliH/EMR
 public string GetJSONPatientDemographics(DataTable dtPatientDemographics, string EMRPatientID, string RequestID, string EMRID, string ModuleID, string UserID)
 {
     try
     {
         PatientDemographics objPatientDemographics = new PatientDemographics();
         string JSONString = objPatientDemographics.GenerateAPIJSONString(dtPatientDemographics, EMRPatientID, RequestID, EMRID, ModuleID, UserID);
         return(JSONString);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #6
0
ファイル: EpicAPI.cs プロジェクト: IntelliH/EMR
        public DataTable GetPatientDemographics(string patientid, string stagingdbconnectionstring, string requestid)
        {
            try
            {
                DataTable dtPatientData = new DataTable();

                parameters["patientid"] = patientid;

                PatientDemographics objPatientDemographics = new PatientDemographics();
                dtPatientData = objPatientDemographics.GetData(parameters);

                //Common objCommon = new Common();
                //objCommon.InsertRecords(dtPatientData, "IntelliHAthenaPatientDemographics", stagingdbconnectionstring, requestid);

                return(dtPatientData);
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #7
0
 public bool Put(int id, [FromBody] PatientDemographics value)
 {
     return(_serviceImplementation.Update(id, value));
 }
コード例 #8
0
 public int Post([FromBody] PatientDemographics value)
 {
     return(_serviceImplementation.Save(value));
 }