Beispiel #1
0
 public VisitSummary(
     EntityRef visitRef,
     PatientProfileSummary patient,
     CompositeIdentifierDetail visitNumber,
     EnumValueInfo patientClass,
     EnumValueInfo patientType,
     EnumValueInfo admissionType,
     EnumValueInfo status,
     DateTime?admitTime,
     DateTime?dischargeTime,
     FacilitySummary facility,
     LocationSummary currentLocation,
     string currentRoom,
     string currentBed)
 {
     this.VisitRef        = visitRef;
     this.Patient         = patient;
     this.VisitNumber     = visitNumber;
     this.PatientClass    = patientClass;
     this.PatientType     = patientType;
     this.AdmissionType   = admissionType;
     this.Status          = status;
     this.AdmitTime       = admitTime;
     this.DischargeTime   = dischargeTime;
     this.Facility        = facility;
     this.CurrentLocation = currentLocation;
     this.CurrentRoom     = currentRoom;
     this.CurrentBed      = currentBed;
 }
		public PatientBiographyDocument(PatientProfileSummary patientProfile, IDesktopWindow window)
			: base(patientProfile.PatientRef, window)
		{
			Platform.CheckForNullReference(patientProfile.PatientRef, "PatientRef");
			Platform.CheckForNullReference(patientProfile.PatientProfileRef, "PatientProfileRef");

			_patientRef = patientProfile.PatientRef;
			_profileRef = patientProfile.PatientProfileRef;
			_patientName = patientProfile.Name;
			_mrn = patientProfile.Mrn;
		}
		public PatientProfileSummary CreatePatientProfileSummary(PatientProfile profile, IPersistenceContext context)
		{
			var nameAssembler = new PersonNameAssembler();
			var healthcardAssembler = new HealthcardAssembler();

			var summary = new PatientProfileSummary
				{
					Mrn = new MrnAssembler().CreateMrnDetail(profile.Mrn),
					DateOfBirth = profile.DateOfBirth,
					Healthcard = healthcardAssembler.CreateHealthcardDetail(profile.Healthcard),
					Name = nameAssembler.CreatePersonNameDetail(profile.Name),
					PatientRef = profile.Patient.GetRef(),
					PatientProfileRef = profile.GetRef(),
					Sex = EnumUtils.GetEnumValueInfo(profile.Sex, context)
				};

			return summary;
		}
		private void SaveChanges()
		{
			SynchronizeAttachedDocumentChanges();

			Platform.GetService<IPatientAdminService>(service =>
				{
					if (_isNew)
					{
						var response = service.AddPatient(new AddPatientRequest(_profile));
						_result = response.PatientProfile;
					}
					else
					{
						var response = service.UpdatePatientProfile(new UpdatePatientProfileRequest(_profileRef, _profile));
						_result = response.PatientProfile;
					}
				});
		}