public async Task Get_Concept_With_A_Lesson_And_An_Exercise(Mock <IAuthorizationService> authorizationService, IStateService stateService, Concept concept, Concept invalidConcept, User user) { authorizationService.Setup(x => x.HasWriteAccess(user, It.IsAny <Concept>(), It.IsAny <CancellationToken>())).ReturnsAsync(false); concept.Exercises.First().Questions.First().Answers.First().Valid = true; invalidConcept.Exercises.First().Questions.First().Answers.ForEach(x => x.Valid = false); invalidConcept.Lessons.Clear(); var context = TestSetup.SetupContext(); var httpContext = TestSetup.SetupHttpContext().SetupSession(user); await context.Concepts.AddAsync(concept); await context.Concepts.AddAsync(invalidConcept); await context.SaveChangesAsync(); var service = new ConceptService(context, httpContext, authorizationService.Object, stateService); var result = await service.Get(concept.Id); var invalidResult = await service.Get(invalidConcept.Id); result.Should().NotBeNull().And.BeEquivalentTo(concept); invalidResult.Should().BeNull(); }
public JsonResult GetMonthlyConceptAndTransactionInformation(string caseDate, int caseId) { DateTime newCaseDate; DateTime.TryParse(caseDate, out newCaseDate); object[] result = new object [4]; if (newCaseDate.IsNull()) { return(Json(new { Success = false }, JsonRequestBehavior.AllowGet)); } var monthlyConcept = ConceptService.GetByConceptAndYear("IPP", "Incapacidad", newCaseDate.Year); var success = true; if (monthlyConcept == null) { success = false; } var transactionsIPP = TransactionService.SearchIppTransactions(caseId); DateTime?MaxDate = (from d in transactionsIPP select d.DecisionDate).Max(); decimal?TotalTransactionAmount = (from d in transactionsIPP select d.TransactionAmount).Sum(); result[0] = MaxDate; //Maximun transaction date accross all IPP Transactions result[1] = !monthlyConcept.IsNull() ? monthlyConcept.MonthlyPayment : null; //Monthly Payment result[2] = !monthlyConcept.IsNull() ? monthlyConcept.Maximum : null; //Maximun amount to be paid for a case year result[3] = TotalTransactionAmount; //Total transaction amounts of IPP transactions return(Json(new { Success = success, Data = result }, JsonRequestBehavior.AllowGet)); }
public ActionResult GetConcepts(int?clubid = null, int?conceptid = null, int?language = 0) { _logger.LogInformation("Logging info"); List <Concept> concepts = new ConceptService(clubid, conceptid, language).GetConcepts(); return(Ok(concepts)); }
public JsonResult FindTransactionsPendingDiet(SearchViewModel model) { var result = new List <ApprovalPendingDietModel>(); var allowReversar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Reversar"); var allowAprobar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Aprobar"); var allowRechazar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Rechazar"); var allowCancelar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Cancelar"); var allowEditar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Editar"); int?conceptId = ConceptService.GetConceptByCode(((int)PaymentConceptEnum.Dieta).ToString()).ConceptId; var payments = PaymentService.FindPaymentsToApprove(model.EBTNumber, model.CaseNumber, model.EntityName, model.SocialSecurityNumber, model.BirthDate, model.FilingDate, model.RegionId, model.DispensaryId, model.From, model.To, model.StatusId, conceptId).ToList(); foreach (var payment in payments) { if (payment.CaseId == null) { continue; } if (payment.CaseDetailId != null) { result.Add(new ApprovalPendingDietModel { CaseId = payment.CaseId.Value, CaseDetailId = payment.CaseDetailId.Value, CaseNumber = payment.CaseNumber, Lesionado = payment.CaseDetail.Entity.FullName, Ssn = payment.CaseDetail.Entity.SSN, FechaNacimiento = payment.CaseDetail.Entity.BirthDate.ToShortDateString(), FechaDecision = payment.IssueDate.ToShortDateString(), Desde = payment.FromDate.ToShortDateString(), Hasta = payment.ToDate.ToShortDateString(), NroDias = payment.PaymentDay.HasValue ? payment.PaymentDay.ToString() : string.Empty, Jornal = payment.Case.DailyWage.ToCurrency(), CompSemanal = payment.Case.WeeklyComp.ToCurrency(), Dieta = payment.Amount.ToCurrency(), Estado = payment.Status.Status1, RazonRechazo = payment.Transaction.IsNull() ? string.Empty : payment.Transaction.RejectedReason, TransactionId = payment.TransactionId, PaymentId = payment.PaymentId, DiasSemana = payment.Case.DaysWeek ?? 0, StatusId = payment.StatusId.Value, AllowAprobar = allowAprobar, AllowCancelar = allowCancelar, AllowEditar = allowEditar && !payment.CaseDetail.CaseFolderId.HasValue, AllowRechazar = allowRechazar, AllowReversar = allowReversar, }); } } return(JsonDataTable(result)); }
public async Task Update_Subject_State_On_Create(Mock <IAuthorizationService> authorizationService, Mock <IStateService> stateService, ConceptRequest request) { stateService.Setup(x => x.UpdateSubjectState(It.IsAny <Guid>(), It.IsAny <CancellationToken>())); var context = TestSetup.SetupContext(); var httpContext = TestSetup.SetupHttpContext(); var service = new ConceptService(context, httpContext, authorizationService.Object, stateService.Object); await service.Create(request); stateService.VerifyAll(); }
public IActionResult Register(PatientRegisterViewModel model, ConceptService cs) { CoreService service = new CoreService(HttpContext); model.Facilities = service.GetFacilitiesIEnumerable(); model.TBCategory = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_CATEGORY)); model.TBTypes = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_TYPE)); model.TBConfirmation = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_CONFIRMATION)); model.ResistanceProfile = cs.GetConceptAnswersIEnumerable(new Concept(Constants.RESISTANCE_PROFILE)); return(View(model)); }
public async Task Update_Subject_State_On_Delete(Mock <IAuthorizationService> authorizationService, Mock <IStateService> stateService, Concept concept) { stateService.Setup(x => x.UpdateSubjectState(It.IsAny <Guid>(), It.IsAny <CancellationToken>())); var context = TestSetup.SetupContext(); var httpContext = TestSetup.SetupHttpContext(); await context.Concepts.AddAsync(concept); await context.SaveChangesAsync(); var service = new ConceptService(context, httpContext, authorizationService.Object, stateService.Object); await service.Delete(concept.Id); stateService.VerifyAll(); }
public IActionResult Enroll(string p, PatientRegisterViewModel model, ConceptService cs) { model.Patient = new PatientService(HttpContext).GetPatient(p); model.Program.Category = new Concept(Constants.RELAPSE); if (model.Patient.isDead()) { return(LocalRedirect("/patients/profile/" + model.Patient.GetUuid())); } model.Facilities = new CoreService(HttpContext).GetFacilitiesIEnumerable(); model.TBCategory = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_CATEGORY)); model.TBTypes = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_TYPE)); model.TBConfirmation = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_CONFIRMATION)); model.ResistanceProfile = cs.GetConceptAnswersIEnumerable(new Concept(Constants.RESISTANCE_PROFILE)); return(View(model)); }
public IActionResult Add(ContactAddViewModel model, PatientService ps, ConceptService cs, long p = 0) { model.Program = ps.GetPatientProgram(p); model.Program.Patient = ps.GetPatient(model.Program.Patient.Id); model.Location = cs.GetConceptAnswersIEnumerable(new Concept(Constants.LOCATION_OF_CONTACT)); model.Relation = cs.GetConceptAnswersIEnumerable(new Concept(Constants.RELATION_TO_INDEX)); model.Proximity = cs.GetConceptAnswersIEnumerable(new Concept(Constants.PROXIMITY_TO_INDEX)); model.DeseaseAfterExposure = cs.GetConceptAnswersIEnumerable(new Concept(Constants.DESEASE_AFTER_EXPOSURE)); model.PreviouslyTreated = cs.GetConceptAnswersIEnumerable(new Concept(Constants.PREVIOUSLY_TREATED)); //Exam Options model.LatentTBI = cs.GetConceptAnswersIEnumerable(new Concept(Constants.LATENT_TB_INFECTION)); model.SputumSmearItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.SPUTUM_SMEAR)); model.GeneXpertItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.GENE_XPERT)); model.XrayExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.XRAY_EXAM)); return(View(model)); }
public IActionResult Multiple(PatientMultipleRegisterModel model, ConceptService cs) { CoreService service = new CoreService(HttpContext); model.Facilities = service.GetFacilitiesIEnumerable(); model.TBCategory = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TB_CATEGORY)); //Referral Options model.DotsBy = cs.GetConceptAnswersIEnumerable(new Concept(Constants.DOTS_BY)); model.Referees = cs.GetConceptAnswersIEnumerable(new Concept(Constants.REFERRED_BY)); //Exam Options model.SputumSmearItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.SPUTUM_SMEAR)); model.GeneXpertItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.GENE_XPERT)); model.HivExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.HIV_EXAM)); model.XrayExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.XRAY_EXAM)); return(View(model)); }
public ActionResult Save(IndexViewModel model) { var caseDetail = CaseService.FindCaseDetailById(model.CaseDetailId); CaseDetailViewModel cdv = new CaseDetailViewModel(); var esMuerte = caseDetail.Case.ConceptId == ConceptService.GetAllConcepts().Where(p => p.ConceptCode == ((int)PaymentConceptEnum.Muerte).ToString()).FirstOrDefault().ConceptId ? true: false; var esITP = caseDetail.Case.ConceptId == ConceptService.GetAllConcepts().Where(p => p.ConceptCode == ((int)PaymentConceptEnum.ITP).ToString()).FirstOrDefault().ConceptId ? true : false; var caseMain = CaseService.FindCaseDetailByIdAndKey(caseDetail.CaseId.Value, caseDetail.CaseKey); var adjustmentType = (AdjustmentTypeEnum)model.AdjustmentTypeId; switch (adjustmentType) { case AdjustmentTypeEnum.AjusteMensualidad: CreateTransactionAjusteMensualidad(model, caseDetail, caseMain); break; case AdjustmentTypeEnum.AjusteReserva: CreateTransactionAjusteReserva(model, caseDetail, esMuerte, caseMain); break; case AdjustmentTypeEnum.Reevaluacion: CreateTransactionReevaluacion(model, caseDetail, esMuerte, caseMain); break; case AdjustmentTypeEnum.Cancelacion: UpdateCancellationCaseDetail(model, caseDetail); break; case AdjustmentTypeEnum.Cierre: CreateTransactionCierreBalanceMuerteItp(model, caseDetail, esMuerte, caseMain); break; case AdjustmentTypeEnum.Reanudacion: ResumeCaseDetail(model, caseDetail); break; default: break; } return(Json(new BasicDataTablesResult(new { Status = "OK" }))); }
public async Task Get_Entire_Concept_With_Write_Access(Mock <IAuthorizationService> authorizationService, IStateService stateService, Concept concept, User user) { authorizationService.Setup(x => x.HasWriteAccess(user, concept, It.IsAny <CancellationToken>())).ReturnsAsync(true); concept.Exercises.First().Questions.First().Answers.ForEach(x => x.Valid = false); var context = TestSetup.SetupContext(); var httpContext = TestSetup.SetupHttpContext().SetupSession(user); await context.Users.AddAsync(user); await context.Concepts.AddRangeAsync(concept); await context.SaveChangesAsync(); var service = new ConceptService(context, httpContext, authorizationService.Object, stateService); var result = await service.Get(concept.Id); result.Should().BeEquivalentTo(concept); }
public JsonResult FindTransactionsDeath(SearchViewModel model) { var result = new List <ApprovalDeathModel>(); int?conceptId = ConceptService.GetConceptByCode(((int)PaymentConceptEnum.Muerte).ToString()).ConceptId; var allowReversar = this.PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Reversar"); var allowAprobar = this.PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Aprobar"); var allowRechazar = this.PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Rechazar"); var allowCancelar = this.PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Cancelar"); var allowEditar = this.PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Editar"); var payments = PaymentService.FindPaymentsToApprove(model.EBTNumber, model.CaseNumber, model.EntityName, model.SocialSecurityNumber, model.BirthDate, model.FilingDate, model.RegionId, model.DispensaryId, model.From, model.To, model.StatusId, conceptId).Where(p => p.Transaction.IsNull()); var groupsCaseIds = payments.DistinctBy(p => p.CaseId); foreach (var parent in groupsCaseIds) { if (parent.CaseId == null) { continue; } var casedetail = CaseService.FindCaseDetailByIdAndKey(parent.CaseId.Value, parent.CaseKey); var lesionado = EntityService.GetById(casedetail.EntityId.Value); var groupPayments = payments.Where(x => x.CaseId != null && x.CaseId.Value == casedetail.CaseId); var transaction = TransactionService.FindTransactionById(parent.TransactionId.Value); if (casedetail.CaseId == null) { continue; } var approvalDeath = new ApprovalDeathModel { CaseId = casedetail.CaseId.Value, CaseDetailId = casedetail.CaseDetailId, CaseNumber = casedetail.CaseNumber, Lesionado = lesionado != null ? lesionado.FullName : string.Empty, Ssn = lesionado != null ? lesionado.SSN : string.Empty, FechaDecision = transaction != null && transaction.DecisionDate != null? transaction.DecisionDate.ToShortDateString() : string.Empty, FechaDefuncion = lesionado != null && lesionado.DeceaseDate != null? lesionado.DeceaseDate.ToShortDateString() : string.Empty, AllowAprobar = true, AllowCancelar = true, AllowEditar = true, AllowRechazar = true, AllowReversar = true }; foreach (var child in groupPayments) { if (child.CaseId == null) { continue; } if (child.CaseDetailId == null) { continue; } if (child.StatusId == null) { continue; } if (child.Amount != null) { var payment = PaymentService.FindPaymentById(child.PaymentId); var entidad = EntityService.GetById(payment.CaseDetail.EntityId.Value); var rel = RelationshipTypeService.GetRelationshipTypes(). Where(m => m.RelationshipCategoryId == child.CaseDetail.RelationshipTypeId).FirstOrDefault(); approvalDeath.Beneficiarios.Add(new ApprovalDeathBeneficiariesModel { CaseId = child.CaseId.Value, CaseDetailId = child.CaseDetailId.Value, CaseNumber = string.Format("{0} {1}", child.CaseNumber, child.CaseDetail != null ? child.CaseDetail.CaseKey : string.Empty), TransactionId = child.TransactionId != null ? child.TransactionId.Value : 0, Beneficiario = entidad.FullName, Ssn = entidad.SSN, FechaNacimiento = entidad.BirthDate.ToShortDateString(), Relacion = rel.RelationshipType1, Estudiante = entidad.IsStudying != null && entidad.IsStudying.Value ? "Si" : "No", Tutor = string.Empty, PagoInicial = child.Amount.Value.ToCurrency(), Reserva = child.CaseDetail.Reserve.ToCurrency(), Mensualidad = child.CaseDetail.MonthlyInstallment.ToCurrency(), MensualidadesVencidas = (child.Amount / child.CaseDetail.MonthlyInstallment).ToString(), TotalAPagar = child.Amount.ToCurrency(), Estatus = child.Status.Status1, EstatusId = child.StatusId.Value }); } } result.Add(approvalDeath); } return(JsonDataTable(result)); }
public JsonResult FindTransactionsIpp(SearchViewModel model) { var result = new List <ApprovalIppModel>(); int?conceptId = ConceptService.GetConceptByCode(((int)PaymentConceptEnum.IPP).ToString()).ConceptId; var transactions = TransactionService.FindTransactionsToApprove(model.EBTNumber, model.CaseNumber, model.EntityName, model.SocialSecurityNumber, model.BirthDate, model.FilingDate, model.RegionId, model.DispensaryId, model.From, model.To, model.DocumentType, model.StatusId, conceptId).ToList(); var allowReversar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Reversar"); var allowAprobar = true; PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Aprobar"); var allowRechazar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Rechazar"); var allowCancelar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Cancelar"); var allowEditar = PermissionService.IsFunctionalityAllowed("GestionarAprobaciones.Editar"); foreach (var transaction in transactions) { if (transaction.CaseDetail.CaseId == null) { continue; } if (transaction.CaseDetailId == null) { continue; } if (transaction.TransactionDate == null) { continue; } var approvalIppModel = new ApprovalIppModel { TransactionId = transaction.TransactionId, CaseId = transaction.CaseDetail.CaseId.Value, CaseNumber = transaction.CaseDetail.CaseNumber, CaseDetailId = transaction.CaseDetailId.Value, Lesionado = transaction.CaseDetail.Entity.FullName, Ssn = transaction.CaseDetail.Entity.SSN, FechaAdjudicacion = transaction.DecisionDate.HasValue ? transaction.TransactionDate.Value.ToShortDateString() : string.Empty, TipoAdjudicacion = transaction.TransactionTypeId.HasValue ? transaction.TransactionType.TransactionType1 : string.Empty, CantidadAdjudicada = transaction.TransactionAmount.ToCurrency(), PagoInicial = 1500m.ToCurrency(), Mensualidad = transaction.MonthlyInstallment.GetValueOrDefault(decimal.Zero).ToCurrency(), Semanas = transaction.NumberOfWeeks, MensualidadesVencidas = decimal.Zero, AllowAprobar = allowAprobar, AllowCancelar = allowCancelar, AllowEditar = allowEditar && !transaction.CaseDetail.CaseFolderId.HasValue, AllowRechazar = allowRechazar, AllowReversar = allowReversar, RazonRechazo = "" }; if (transaction.Payments.Any()) { approvalIppModel.TotalPagar = transaction.Payments.Sum(p => p.Amount).GetValueOrDefault(decimal.Zero).ToCurrency(); var firstPayment = transaction.Payments.FirstOrDefault(); if (firstPayment != null) { approvalIppModel.Estado = firstPayment.Status.Status1; approvalIppModel.PaymentId = firstPayment.PaymentId; if (firstPayment.StatusId != null) { approvalIppModel.StatusId = firstPayment.StatusId.Value; } } } else { approvalIppModel.TotalPagar = decimal.Zero.ToCurrency(); approvalIppModel.Estado = string.Empty; } result.Add(approvalIppModel); } return(JsonDataTable(result)); }
public IActionResult Intake(long idnt, PatientIntakeViewModel model, PatientService ps, ConceptService cs) { CoreService core = new CoreService(HttpContext); model.Program = ps.GetPatientProgram(idnt); if (!model.Program.DotsBy.Id.Equals(0)) { return(LocalRedirect("/patients/profile/" + model.Program.Patient.GetUuid())); } //Other Fields model.Patient = ps.GetPatient(model.Program.Patient.Id); model.Regimens = core.GetRegimensIEnumerable(model.Program.Program); model.DotsBy = cs.GetConceptAnswersIEnumerable(new Concept(Constants.DOTS_BY)); model.Referees = cs.GetConceptAnswersIEnumerable(new Concept(Constants.REFERRED_BY)); //Exam Options model.SputumSmearItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.SPUTUM_SMEAR)); model.GeneXpertItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.GENE_XPERT)); model.HivExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.HIV_EXAM)); model.XrayExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.XRAY_EXAM)); //HIV Options model.ARTItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.ART_STARTED_ON)); model.CPTItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.CPT_STARTED_ON)); model.ArtStartedOn = model.Program.ArtStartedOn.ToString("d MMMM, yyyy"); model.CptStartedOn = model.Program.CptStartedOn.ToString("d MMMM, yyyy"); //Facilities/Regimen model.Facilities = core.GetFacilitiesIEnumerable(); model.Regimen = core.GetPatientRegimen(model.Program); if (model.Regimen is null) { model.Regimen = new PatientRegimen(); } else { model.RegimenStartedOn = model.Regimen.StartedOn.ToString("d MMMM, yyyy"); } //Patient Examination model.Examination = core.GetPatientExamination(model.Program, new Visit(1)); if (model.Examination is null) { model.Examination = new PatientExamination(); } else { model.SputumSmearDate = model.Examination.SputumSmearDate.ToString("d MMMM, yyyy"); model.GeneXpertDate = model.Examination.GeneXpertDate.ToString("d MMMM, yyyy"); model.HivExamDate = model.Examination.HivExamDate.ToString("d MMMM, yyyy"); model.XrayExamDate = model.Examination.XrayExamDate.ToString("d MMMM, yyyy"); } return(View(model)); }
public IActionResult VisitsAdd(string p, PatientVisitsViewModel model, CoreService core, PatientService ps, ConceptService cs) { model.Patient = ps.GetPatient(p); model.Program = ps.GetPatientProgram(model.Patient); if (model.Program.DateCompleted.HasValue) { return(LocalRedirect("/patients/profile/" + model.Patient.GetUuid())); } model.Regimen = core.GetPatientRegimen(model.Program); model.Visits = core.GetProgramVisitsIEnumerable(model.Program, model.Regimen.Regimen); model.Regimens = core.GetRegimensIEnumerable(model.Program.Program); model.HivRecent = core.GetRecentHivExamination(model.Program); model.Examination = new PatientExamination { HivExam = model.HivRecent.Result, HivExamDate = model.HivRecent.Date }; //Exam Options model.SputumSmearItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.SPUTUM_SMEAR)); model.HivExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.HIV_EXAM)); model.XrayExamItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.XRAY_EXAM)); model.GeneXpertItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.GENE_XPERT)); //HIV Options model.ARTItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.ART_STARTED_ON)); model.CPTItems = cs.GetConceptAnswersIEnumerable(new Concept(Constants.CPT_STARTED_ON)); return(View(model)); }
public IActionResult Profile(string uuid, PatientProfileViewModel model, PatientService ps, ConceptService cs, long program = 0) { CoreService core = new CoreService(HttpContext); model.Patient = ps.GetPatient(uuid); if (program.Equals(0)) { model.Program = ps.GetPatientProgram(model.Patient); } else { model.Program = ps.GetPatientProgram(program); } if (model.Program.DotsBy.Id.Equals(0)) { return(LocalRedirect("/registration/intake/" + model.Program.Id)); } if (!model.Program.DateCompleted.HasValue) { model.Regimens = core.GetRegimensIEnumerable(model.Program.Program); model.ExamOpts = cs.GetConceptAnswersIEnumerable(new Concept(Constants.SPUTUM_SMEAR)); model.Outcomes = cs.GetConceptAnswersIEnumerable(new Concept(Constants.TREATMENT_OUTCOME)); model.Centers = core.GetAllOtherCentersIEnumerable(model.Program.Facility); model.Facility = core.GetFacilitiesIEnumerable(); } model.Regimen = core.GetPatientRegimen(model.Program); model.DateOfBirth = model.Patient.Person.DateOfBirth.ToString("dd/MM/yyyy"); model.RegimenDate = model.Regimen.StartedOn.ToString("dd/MM/yyyy"); model.Program.Facility = core.GetFacility(model.Program.Facility.Id); model.LatestVitals = ps.GetLatestVitals(model.Patient); model.Examinations = core.GetRecentExaminations(model.Program); model.Contacts = ps.GetContacts(model.Patient); return(View(model)); }