public PatientProfileDetailsEditorControl(PatientProfileDetailsEditorComponent component) :base(component) { InitializeComponent(); _component = component; // create bindings _familyName.DataBindings.Add("Value", _component, "FamilyName", true, DataSourceUpdateMode.OnPropertyChanged); _givenName.DataBindings.Add("Value", _component, "GivenName", true, DataSourceUpdateMode.OnPropertyChanged); _middleName.DataBindings.Add("Value", _component, "MiddleName", true, DataSourceUpdateMode.OnPropertyChanged); _sex.DataSource = _component.SexChoices; _sex.DataBindings.Add("Value", _component, "Sex", true, DataSourceUpdateMode.OnPropertyChanged); _dateOfBirth.DataBindings.Add("Value", _component, "DateOfBirth", true, DataSourceUpdateMode.OnPropertyChanged); _dateOfDeath.DataBindings.Add("Value", _component, "TimeOfDeath", true, DataSourceUpdateMode.OnPropertyChanged); _mrn.DataBindings.Add("Value", _component, "MrnID", true, DataSourceUpdateMode.OnPropertyChanged); _mrn.DataBindings.Add("Enabled", _component, "MrnIDEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _mrnAuthority.DataSource = _component.MrnAuthorityChoices; _mrnAuthority.DataBindings.Add("Value", _component, "MrnAuthority", true, DataSourceUpdateMode.OnPropertyChanged); _mrnAuthority.DataBindings.Add("Enabled", _component, "MrnAuthorityEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _healthcard.DataBindings.Add("Value", _component, "HealthcardID", true, DataSourceUpdateMode.OnPropertyChanged); _insurer.DataSource = _component.HealthcardAuthorityChoices; _insurer.DataBindings.Add("Value", _component, "HealthcardAuthority", true, DataSourceUpdateMode.OnPropertyChanged); _healthcardVersionCode.DataBindings.Add("Value", _component, "HealthcardVersionCode", true, DataSourceUpdateMode.OnPropertyChanged); _healthcardExpiry.DataBindings.Add("Value", _component, "HealthcardExpiryDate", true, DataSourceUpdateMode.OnPropertyChanged); _billingInformation.DataBindings.Add("Value", _component, "BillingInformation", true, DataSourceUpdateMode.OnPropertyChanged); }
public PatientProfileDetailsEditorControl(PatientProfileDetailsEditorComponent component) : base(component) { InitializeComponent(); _component = component; // create bindings _familyName.DataBindings.Add("Value", _component, "FamilyName", true, DataSourceUpdateMode.OnPropertyChanged); _givenName.DataBindings.Add("Value", _component, "GivenName", true, DataSourceUpdateMode.OnPropertyChanged); _middleName.DataBindings.Add("Value", _component, "MiddleName", true, DataSourceUpdateMode.OnPropertyChanged); _sex.DataSource = _component.SexChoices; _sex.DataBindings.Add("Value", _component, "Sex", true, DataSourceUpdateMode.OnPropertyChanged); _dateOfBirth.DataBindings.Add("Value", _component, "DateOfBirth", true, DataSourceUpdateMode.OnPropertyChanged); _dateOfDeath.DataBindings.Add("Value", _component, "TimeOfDeath", true, DataSourceUpdateMode.OnPropertyChanged); _mrn.DataBindings.Add("Value", _component, "MrnID", true, DataSourceUpdateMode.OnPropertyChanged); _mrn.DataBindings.Add("Enabled", _component, "MrnIDEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _mrnAuthority.DataSource = _component.MrnAuthorityChoices; _mrnAuthority.DataBindings.Add("Value", _component, "MrnAuthority", true, DataSourceUpdateMode.OnPropertyChanged); _mrnAuthority.DataBindings.Add("Enabled", _component, "MrnAuthorityEnabled", true, DataSourceUpdateMode.OnPropertyChanged); _healthcard.DataBindings.Add("Value", _component, "HealthcardID", true, DataSourceUpdateMode.OnPropertyChanged); _insurer.DataSource = _component.HealthcardAuthorityChoices; _insurer.DataBindings.Add("Value", _component, "HealthcardAuthority", true, DataSourceUpdateMode.OnPropertyChanged); _healthcardVersionCode.DataBindings.Add("Value", _component, "HealthcardVersionCode", true, DataSourceUpdateMode.OnPropertyChanged); _healthcardExpiry.DataBindings.Add("Value", _component, "HealthcardExpiryDate", true, DataSourceUpdateMode.OnPropertyChanged); _billingInformation.DataBindings.Add("Value", _component, "BillingInformation", true, DataSourceUpdateMode.OnPropertyChanged); }
public override void Start() { Platform.GetService<IPatientAdminService>( service => { var formData = service.LoadPatientProfileEditorFormData(new LoadPatientProfileEditorFormDataRequest()); if (_isNew) { _profile = new PatientProfileDetail(); _profile.Mrn.AssigningAuthority = formData.MrnAssigningAuthorityChoices.Count > 0 ? GetWorkingFacilityInformationAuthority(formData.MrnAssigningAuthorityChoices) : null; _profile.Healthcard.AssigningAuthority = formData.HealthcardAssigningAuthorityChoices.Count > 0 ? formData.HealthcardAssigningAuthorityChoices[0] : null; _profile.Sex = formData.SexChoices[0]; _profile.DateOfBirth = Platform.Time.Date; } else { var response = service.LoadPatientProfileForEdit(new LoadPatientProfileForEditRequest(_profileRef)); _profileRef = response.PatientProfileRef; _profile = response.PatientDetail; this.Host.Title = string.Format(SR.TitlePatientComponent, PersonNameFormat.Format(_profile.Name), MrnFormat.Format(_profile.Mrn)); } if (_newAttachments.Count > 0) { _profile.Attachments.AddRange(_newAttachments); this.Modified = true; this.AcceptEnabled = true; } // if the user has permission to either a) create a new patient, or b) update the patient profile, then // these pages should be displayed if (Thread.CurrentPrincipal.IsInRole( ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.PatientProfile.Update) || Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Create)) { this.Pages.Add( new NavigatorPage( "Patient", _patientEditor = new PatientProfileDetailsEditorComponent( _isNew, formData.MrnAutoGenerated, formData.SexChoices, formData.MrnAssigningAuthorityChoices, formData.HealthcardAssigningAuthorityChoices))); this.Pages.Add( new NavigatorPage( "Patient/Addresses", _addressesSummary = new AddressesSummaryComponent(formData.AddressTypeChoices))); this.Pages.Add( new NavigatorPage( "Patient/Phone Numbers", _phoneNumbersSummary = new PhoneNumbersSummaryComponent(formData.PhoneTypeChoices))); this.Pages.Add( new NavigatorPage("Patient/Email Addresses", _emailAddressesSummary = new EmailAddressesSummaryComponent())); this.Pages.Add( new NavigatorPage( "Patient/Contact Persons", _contactPersonsSummary = new ContactPersonsSummaryComponent(formData.ContactPersonTypeChoices, formData.ContactPersonRelationshipChoices))); this.Pages.Add( new NavigatorPage( "Patient/Culture", _additionalPatientInfoSummary = new PatientProfileAdditionalInfoEditorComponent(formData.ReligionChoices, formData.PrimaryLanguageChoices))); _addressesSummary.SetModifiedOnListChange = true; _phoneNumbersSummary.SetModifiedOnListChange = true; _emailAddressesSummary.SetModifiedOnListChange = true; _contactPersonsSummary.SetModifiedOnListChange = true; _patientEditor.Subject = _profile; _addressesSummary.Subject = _profile.Addresses; _phoneNumbersSummary.Subject = _profile.TelephoneNumbers; _emailAddressesSummary.Subject = _profile.EmailAddresses; _contactPersonsSummary.Subject = _profile.ContactPersons; _additionalPatientInfoSummary.Subject = _profile; } // if the user has permission to either a) create a new patient, or b) update a patient, then // these pages should be displayed if (Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Create) || Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Update)) { this.Pages.Add( new NavigatorPage("Patient/Notes", _notesSummary = new PatientNoteSummaryComponent(_profile.Notes, formData.NoteCategoryChoices))); _notesSummary.SetModifiedOnListChange = true; var patientDocumentsPage = new NavigatorPage( "Patient/Attachments", _documentSummary = new AttachedDocumentPreviewComponent(false, AttachmentSite.Patient)); this.Pages.Add(patientDocumentsPage); _documentSummary.Attachments = _profile.Attachments; if (_newAttachments.Count > 0) { this.MoveTo(this.Pages.IndexOf(patientDocumentsPage)); _documentSummary.SetInitialSelection(_newAttachments[0]); } } this.ValidationStrategy = new AllComponentsValidationStrategy(); }); base.Start(); }
public void SetComponent(IApplicationComponent component) { _component = (PatientProfileDetailsEditorComponent)component; }
public void SetComponent(IApplicationComponent component) { _component = (PatientProfileDetailsEditorComponent)component; }