Merge branch 'AppointmentModule_Modified' of https://git.sentientgeeks.us/ranjit/Hospital_Management into AppointmentModule_Modified
# Conflicts: # angular/src/app/proxy/doctors/dto/models.ts
This commit is contained in:
commit
33421a3d2a
@ -239,7 +239,8 @@
|
||||
</div>
|
||||
<!-- Buttons -->
|
||||
<div class="p-dialog-footer flex justify-content-end">
|
||||
<button type="submit" pButton class="btn btn-primary" [disabled]="patientrecord.invalid">
|
||||
<button type="submit" pButton class="btn btn-primary"
|
||||
[disabled]="patientrecord.invalid || selectedstatus === 0">
|
||||
<i class="pi pi-check"></i> Save
|
||||
</button>
|
||||
<button pButton class="btn btn-secondary ml-2" (click)="closeDialog()">
|
||||
|
@ -53,7 +53,6 @@ export class PatientRecordComponent implements OnInit {
|
||||
uploadProgress1 = 0;
|
||||
uploadProgress2 = 0;
|
||||
uploadProgress3 = 0;
|
||||
doctors = [];
|
||||
doctorOptions = [];
|
||||
doctorname = '';
|
||||
|
||||
@ -141,8 +140,8 @@ export class PatientRecordComponent implements OnInit {
|
||||
|
||||
getdoctorlist() {
|
||||
this.DoctorService.get().subscribe(result => {
|
||||
this.doctors = result;
|
||||
this.doctorOptions = this.doctors.map(doctor => ({
|
||||
const doctors = result;
|
||||
this.doctorOptions = doctors.map(doctor => ({
|
||||
label: `Dr. ${doctor.firstName} ${doctor.lastName}`, // Combine first and last name
|
||||
value: doctor.id, // Use the ID as the value
|
||||
}));
|
||||
@ -154,7 +153,7 @@ export class PatientRecordComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportPatient() {
|
||||
this.patientService.getExportPatientRecord().subscribe(result => {
|
||||
this.patientService.getExportPatientRecord(this.patientId).subscribe(result => {
|
||||
const binary = atob(result.fileContent);
|
||||
const len = binary.length;
|
||||
const bytes = new Uint8Array(len);
|
||||
@ -191,11 +190,13 @@ export class PatientRecordComponent implements OnInit {
|
||||
this.patientDialogTitle = 'Edit Patient';
|
||||
this.patientService.getPatientRecordById(Patient.id).subscribe(result => {
|
||||
this.selectedPatientRecord = result;
|
||||
console.log(result);
|
||||
this.selectedPatientRecord.patientId = this.patientId;
|
||||
this.selectdateOfAdmission = new Date(this.selectedPatientRecord.dateOfAdmission);
|
||||
this.selectnextFollowUp = new Date(this.selectedPatientRecord.nextFollowUp);
|
||||
this.selectdischargeDate = new Date(this.selectedPatientRecord.dischargeDate);
|
||||
this.selectedstatus = this.selectedPatientRecord.status;
|
||||
this.selectedPatientRecord.doctorAssignedID = result.doctorAssigned.id;
|
||||
this.labReportUrlpath = result.labReportUrl != null ? result.labReportUrl.split('\\')[3] : '';
|
||||
this.medicationUrlpath =
|
||||
result.medicationUrl != null ? result.medicationUrl.split('\\')[3] : '';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import type { FullAuditedEntity } from '../../volo/abp/domain/entities/auditing/models';
|
||||
|
||||
export interface DoctorDto extends FullAuditedEntity<string> {
|
||||
id?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
gender?: string;
|
||||
|
@ -53,10 +53,10 @@ export class PatientService {
|
||||
{ apiName: this.apiName,...config });
|
||||
|
||||
|
||||
getExportPatientRecord = (config?: Partial<Rest.Config>) =>
|
||||
getExportPatientRecord = (patientId: string, config?: Partial<Rest.Config>) =>
|
||||
this.restService.request<any, FileDownloadDto>({
|
||||
method: 'GET',
|
||||
url: '/api/app/patient/export-patient-record',
|
||||
url: `/api/app/patient/export-patient-record/${patientId}`,
|
||||
},
|
||||
{ apiName: this.apiName,...config });
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
export interface Entity<Tkey> {
|
||||
export interface Entity<TKey> {
|
||||
}
|
||||
|
||||
export interface AggregateRoot<TKey> extends BasicAggregateRoot<TKey> {
|
||||
|
@ -9,6 +9,7 @@ namespace HospitalManagementSystem.Doctors.Dto
|
||||
{
|
||||
public class DoctorDto : FullAuditedEntity<Guid>
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
|
@ -94,6 +94,7 @@ namespace HospitalManagementSystem.Patients
|
||||
public async Task<PatientRecordDto> GetPatientRecordByIdAsync(Guid id)
|
||||
{
|
||||
var patient = await _patientrecordRepository.GetQueryableAsync().Result
|
||||
.Include(x => x.DoctorAssigned)
|
||||
.Include(x => x.LabReportUrl)
|
||||
.Include(x => x.MedicationUrl)
|
||||
.Include(x => x.MedicationHistoryUrl)
|
||||
@ -108,9 +109,16 @@ namespace HospitalManagementSystem.Patients
|
||||
#endregion
|
||||
|
||||
#region Export Patient Data to Excel
|
||||
public async Task<FileDownloadDto> GetExportPatientRecordAsync()
|
||||
public async Task<FileDownloadDto> GetExportPatientRecordAsync(Guid patientId)
|
||||
{
|
||||
var patientrecord = await _patientrecordRepository.GetQueryableAsync().Result.Include(x => x.Patients).ToListAsync();
|
||||
var patientrecord = await _patientrecordRepository.GetQueryableAsync().Result
|
||||
.Include(x => x.Patients)
|
||||
.Include(x => x.LabReportUrl)
|
||||
.Include(x => x.MedicationUrl)
|
||||
.Include(x => x.MedicationHistoryUrl)
|
||||
.Include(x => x.DoctorAssigned)
|
||||
.Where(x => x.Patients.Id == patientId)
|
||||
.ToListAsync();
|
||||
|
||||
var folderPath = Path.Combine(_env.WebRootPath, "temp");
|
||||
if (!Directory.Exists(folderPath))
|
||||
@ -153,9 +161,9 @@ namespace HospitalManagementSystem.Patients
|
||||
worksheet.Cell(i + 2, 7).Value = (patient.DoctorAssigned?.FirstName + patient.DoctorAssigned?.LastName) ?? "Not Assigned";
|
||||
worksheet.Cell(i + 2, 8).Value = patient.DoctorNotes;
|
||||
worksheet.Cell(i + 2, 9).Value = patient.NextFollowUp?.ToShortDateString() ?? "N/A";
|
||||
worksheet.Cell(i + 2, 10).Value = patient.LabReportUrl?.FilePath ?? "No Report";
|
||||
worksheet.Cell(i + 2, 11).Value = patient.MedicationUrl?.FilePath ?? "No Medication";
|
||||
worksheet.Cell(i + 2, 12).Value = patient.MedicationHistoryUrl?.FilePath ?? "No History";
|
||||
worksheet.Cell(i + 2, 10).Value = patient.LabReportUrl?.GeneratedFileName ?? "No Report";
|
||||
worksheet.Cell(i + 2, 11).Value = patient.MedicationUrl?.GeneratedFileName ?? "No Medication";
|
||||
worksheet.Cell(i + 2, 12).Value = patient.MedicationHistoryUrl?.GeneratedFileName ?? "No History";
|
||||
worksheet.Cell(i + 2, 13).Value = patient.Status.ToString();
|
||||
}
|
||||
worksheet.Columns().AdjustToContents();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace HospitalManagementSystem.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class fieldchanges_patient_patientrecord : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InsuranceProvider",
|
||||
table: "PatientRecords");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AdmissionDate",
|
||||
table: "Patient");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DischargeDate",
|
||||
table: "Patient");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Status",
|
||||
table: "Patient");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Treatment",
|
||||
table: "Patient",
|
||||
newName: "PatientCardId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DoctorAssigned",
|
||||
table: "Patient",
|
||||
newName: "InsuranceProvider");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DischargeDate",
|
||||
table: "PatientRecords",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DoctorAssignedId",
|
||||
table: "PatientRecords",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PatientRecords_DoctorAssignedId",
|
||||
table: "PatientRecords",
|
||||
column: "DoctorAssignedId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PatientRecords_Doctors_DoctorAssignedId",
|
||||
table: "PatientRecords",
|
||||
column: "DoctorAssignedId",
|
||||
principalTable: "Doctors",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PatientRecords_Doctors_DoctorAssignedId",
|
||||
table: "PatientRecords");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PatientRecords_DoctorAssignedId",
|
||||
table: "PatientRecords");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DischargeDate",
|
||||
table: "PatientRecords");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoctorAssignedId",
|
||||
table: "PatientRecords");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PatientCardId",
|
||||
table: "Patient",
|
||||
newName: "Treatment");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InsuranceProvider",
|
||||
table: "Patient",
|
||||
newName: "DoctorAssigned");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "InsuranceProvider",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "AdmissionDate",
|
||||
table: "Patient",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DischargeDate",
|
||||
table: "Patient",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Status",
|
||||
table: "Patient",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,72 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace HospitalManagementSystem.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class nullablechanges_patientrecord : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TreatmentPlan",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DoctorNotes",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Diagnosis",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TreatmentPlan",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DoctorNotes",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Diagnosis",
|
||||
table: "PatientRecords",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user