Example #1
0
        public LoadVisitEditorFormDataResponse LoadVisitEditorFormData(LoadVisitEditorFormDataRequest request)
        {
            // ignore request

            LoadVisitEditorFormDataResponse response = new LoadVisitEditorFormDataResponse();

            response.AdmissionTypeChoices = EnumUtils.GetEnumValueList<AdmissionTypeEnum>(PersistenceContext);
            response.AmbulatoryStatusChoices = EnumUtils.GetEnumValueList<AmbulatoryStatusEnum>(PersistenceContext);
            response.PatientClassChoices = EnumUtils.GetEnumValueList<PatientClassEnum>(PersistenceContext);
            response.PatientTypeChoices = EnumUtils.GetEnumValueList<PatientTypeEnum>(PersistenceContext);
            response.VisitLocationRoleChoices = EnumUtils.GetEnumValueList<VisitLocationRoleEnum>(PersistenceContext);
            response.VisitNumberAssigningAuthorityChoices = EnumUtils.GetEnumValueList<InformationAuthorityEnum>(PersistenceContext);

            response.VisitPractitionerRoleChoices = EnumUtils.GetEnumValueList<VisitPractitionerRoleEnum>(PersistenceContext);
            response.VisitStatusChoices = EnumUtils.GetEnumValueList<VisitStatusEnum>(PersistenceContext);

            FacilityAssembler facilityAssembler = new FacilityAssembler();
            response.FacilityChoices = CollectionUtils.Map<Facility, FacilitySummary, List<FacilitySummary>>(
				PersistenceContext.GetBroker<IFacilityBroker>().FindAll(false),
                delegate(Facility f)
                {
                    return facilityAssembler.CreateFacilitySummary(f);
                });

			LocationAssembler locationAssembler = new LocationAssembler();
			response.CurrentLocationChoices = CollectionUtils.Map<Location, LocationSummary>(
				PersistenceContext.GetBroker<ILocationBroker>().FindAll(false),
				delegate(Location f)
				{
					return locationAssembler.CreateLocationSummary(f);
				});

			return response;
        }
Example #2
0
        public LoadVisitEditorFormDataResponse LoadVisitEditorFormData(LoadVisitEditorFormDataRequest request)
        {
            // ignore request

            LoadVisitEditorFormDataResponse response = new LoadVisitEditorFormDataResponse();

            response.AdmissionTypeChoices                 = EnumUtils.GetEnumValueList <AdmissionTypeEnum>(PersistenceContext);
            response.AmbulatoryStatusChoices              = EnumUtils.GetEnumValueList <AmbulatoryStatusEnum>(PersistenceContext);
            response.PatientClassChoices                  = EnumUtils.GetEnumValueList <PatientClassEnum>(PersistenceContext);
            response.PatientTypeChoices                   = EnumUtils.GetEnumValueList <PatientTypeEnum>(PersistenceContext);
            response.VisitLocationRoleChoices             = EnumUtils.GetEnumValueList <VisitLocationRoleEnum>(PersistenceContext);
            response.VisitNumberAssigningAuthorityChoices = EnumUtils.GetEnumValueList <InformationAuthorityEnum>(PersistenceContext);

            response.VisitPractitionerRoleChoices = EnumUtils.GetEnumValueList <VisitPractitionerRoleEnum>(PersistenceContext);
            response.VisitStatusChoices           = EnumUtils.GetEnumValueList <VisitStatusEnum>(PersistenceContext);

            FacilityAssembler facilityAssembler = new FacilityAssembler();

            response.FacilityChoices = CollectionUtils.Map <Facility, FacilitySummary, List <FacilitySummary> >(
                PersistenceContext.GetBroker <IFacilityBroker>().FindAll(false),
                delegate(Facility f)
            {
                return(facilityAssembler.CreateFacilitySummary(f));
            });

            LocationAssembler locationAssembler = new LocationAssembler();

            response.CurrentLocationChoices = CollectionUtils.Map <Location, LocationSummary>(
                PersistenceContext.GetBroker <ILocationBroker>().FindAll(false),
                delegate(Location f)
            {
                return(locationAssembler.CreateLocationSummary(f));
            });

            return(response);
        }