misc fixes
This commit is contained in:
parent
48d6a3fae8
commit
79d1e38f26
@ -275,6 +275,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-fluid grid">
|
||||
<div class="col-6">
|
||||
<div class="field">
|
||||
<label for="status">Status</label>
|
||||
<p-dropdown name="status" id="status" [options]="statuslist" [(ngModel)]="selectedstatus"
|
||||
optionLabel="label" optionValue="value" placeholder="Select status"
|
||||
required></p-dropdown>
|
||||
<small *ngIf="selectedstatus === 0" class="p-error">Status is required</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" pButton class="btn btn-primary"
|
||||
|
@ -161,7 +161,7 @@ namespace HospitalManagementSystem.Patients
|
||||
|
||||
#region Create Patient
|
||||
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
||||
public async Task<PatientRecordDto> CreatePatientRecordAsync(CreateUpdatePatientRecordDto input)
|
||||
public async Task CreatePatientRecordAsync(CreateUpdatePatientRecordDto input)
|
||||
{
|
||||
var patientEntity = await _patientRepository.GetAsync(input.PatientId); // Get Patient from DB
|
||||
var patientRecord = ObjectMapper.Map<CreateUpdatePatientRecordDto, PatientRecord>(input);
|
||||
@ -194,14 +194,12 @@ namespace HospitalManagementSystem.Patients
|
||||
}
|
||||
}
|
||||
patientRecord = await _patientrecordRepository.InsertAsync(patientRecord);
|
||||
|
||||
return ObjectMapper.Map<PatientRecord, PatientRecordDto>(patientRecord);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Patient
|
||||
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
||||
public async Task<PatientRecordDto> UpdatePatientRecordAsync(Guid id, CreateUpdatePatientRecordDto input)
|
||||
public async Task UpdatePatientRecordAsync(Guid id, CreateUpdatePatientRecordDto input)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -240,7 +238,6 @@ namespace HospitalManagementSystem.Patients
|
||||
}
|
||||
patientRecord = await _patientrecordRepository.UpdateAsync(patientRecord);
|
||||
|
||||
return ObjectMapper.Map<PatientRecord, PatientRecordDto>(patientRecord);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -364,7 +361,7 @@ namespace HospitalManagementSystem.Patients
|
||||
|
||||
#region Create Patient
|
||||
[Authorize(HospitalManagementSystemPermissions.Patient.Create)]
|
||||
public async Task<PatientDto> CreatePatientAsync(CreateUpdatePatientDto input)
|
||||
public async Task CreatePatientAsync(CreateUpdatePatientDto input)
|
||||
{
|
||||
var patient = ObjectMapper.Map<CreateUpdatePatientDto, Patient>(input);
|
||||
|
||||
@ -381,14 +378,12 @@ namespace HospitalManagementSystem.Patients
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ObjectMapper.Map<Patient, PatientDto>(patient);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Patient
|
||||
[Authorize(HospitalManagementSystemPermissions.Patient.Edit)]
|
||||
public async Task<PatientDto> UpdatePatientAsync(Guid id, CreateUpdatePatientDto input)
|
||||
public async Task UpdatePatientAsync(Guid id, CreateUpdatePatientDto input)
|
||||
{
|
||||
var patient = await _patientRepository.GetQueryableAsync().Result.Include(x => x.Images).Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||
List<EntityDocument> entitydocument = new List<EntityDocument>();
|
||||
@ -407,7 +402,6 @@ namespace HospitalManagementSystem.Patients
|
||||
}
|
||||
|
||||
patient = await _patientRepository.UpdateAsync(patient);
|
||||
return ObjectMapper.Map<Patient, PatientDto>(patient);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user