Compare commits
5 Commits
c5df13a8f2
...
91bfc622d1
Author | SHA1 | Date | |
---|---|---|---|
91bfc622d1 | |||
b5ef24a736 | |||
6394ece8d3 | |||
48d6a3fae8 | |||
bcd8aa205a |
@ -67,7 +67,7 @@
|
|||||||
<th pSortableColumn="timeOfAppointment">Time<p-sortIcon field="timeOfAppointment" /></th>
|
<th pSortableColumn="timeOfAppointment">Time<p-sortIcon field="timeOfAppointment" /></th>
|
||||||
<th>Mobile No</th>
|
<th>Mobile No</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
<th pSortableColumn="status">Appointment Status<p-sortIcon field="status" /></th>
|
<th pSortableColumn="appointmentStatus">Appointment Status<p-sortIcon field="appointmentStatus" /></th>
|
||||||
<th pSortableColumn="visitType">Visit Type<p-sortIcon field="visitType" /></th>
|
<th pSortableColumn="visitType">Visit Type<p-sortIcon field="visitType" /></th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -78,25 +78,44 @@
|
|||||||
<td>{{ appointment.firstName }} {{ appointment.lastName }}</td>
|
<td>{{ appointment.firstName }} {{ appointment.lastName }}</td>
|
||||||
<td>{{ appointment.doctor }}</td>
|
<td>{{ appointment.doctor }}</td>
|
||||||
<td>
|
<td>
|
||||||
<i
|
<p-chip
|
||||||
class="pi"
|
[severity]="appointment.gender === 1 ? 'info' : 'danger'"
|
||||||
[ngClass]="{
|
[styleClass]="'px-2 py-1 text-sm font-medium'"
|
||||||
'pi-mars text-primary': appointment.gender === 1,
|
>
|
||||||
'pi-venus text-pink-500': appointment.gender === 2
|
|
||||||
}"
|
|
||||||
></i>
|
|
||||||
{{ getGenderLabel(appointment.gender) }}
|
{{ getGenderLabel(appointment.gender) }}
|
||||||
|
</p-chip>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>{{ appointment.dateOfAppointment | date }}</td>
|
<td>{{ appointment.dateOfAppointment | date }}</td>
|
||||||
<td><i class="pi pi-clock"></i> {{ appointment.timeOfAppointment }}</td>
|
<td>{{ appointment.timeOfAppointment }}</td>
|
||||||
<td>{{ appointment.mobile }}</td>
|
<td>{{ appointment.mobile }}</td>
|
||||||
<td>{{ appointment.email }}</td>
|
<td>{{ appointment.email }}</td>
|
||||||
<td>{{ appointment.status }}</td>
|
|
||||||
<td>{{ appointment.visitType }}</td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<p-chip
|
||||||
|
[severity]="appointment.appointmentStatus === 1 ? 'info' : 'danger'"
|
||||||
|
[styleClass]="'px-2 py-1 text-sm font-medium'"
|
||||||
|
>
|
||||||
|
|
||||||
|
{{ getStatusLabel(appointment.appointmentStatus) }}
|
||||||
|
</p-chip>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p-chip
|
||||||
|
[severity]="appointment.visitType === 1 ? 'info' : 'danger'"
|
||||||
|
[styleClass]="'px-2 py-1 text-sm font-medium'"
|
||||||
|
>
|
||||||
|
|
||||||
|
{{ getVisitTypeLabel(appointment.visitType) }}
|
||||||
|
</p-chip>
|
||||||
|
</td>
|
||||||
|
<td class="d-flex">
|
||||||
<button class="btn btn-warning btn-sm ml-1" (click)="editAppointment(appointment)">
|
<button class="btn btn-warning btn-sm ml-1" (click)="editAppointment(appointment)">
|
||||||
<i class="pi pi-pencil"></i>
|
<i class="pi pi-pencil"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn btn-danger btn-sm ml-1"
|
||||||
|
(click)="deleteAppointment(appointment.id)"><i class="pi pi-trash"></i></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -104,7 +123,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p-dialog
|
<p-dialog
|
||||||
header="{{ isEditing ? 'Edit Appointment' : 'New Appointment' }}"
|
header="{{ isEditMode ? 'Edit Appointment' : 'New Appointment' }}"
|
||||||
[(visible)]="appointmentDialog"
|
[(visible)]="appointmentDialog"
|
||||||
[modal]="true"
|
[modal]="true"
|
||||||
[closable]="true"
|
[closable]="true"
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
.table-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.2rem 0.6rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NgForm } from '@angular/forms';
|
import { NgForm } from '@angular/forms';
|
||||||
@ -18,7 +18,6 @@ export class ViewAppointmentComponent {
|
|||||||
AppointmentDialogTitle: string = '';
|
AppointmentDialogTitle: string = '';
|
||||||
AppointmentDialog: boolean = false;
|
AppointmentDialog: boolean = false;
|
||||||
patients: [];
|
patients: [];
|
||||||
isEditing = false;
|
|
||||||
appointmentDialog = false;
|
appointmentDialog = false;
|
||||||
genders = Gender;
|
genders = Gender;
|
||||||
appointmentStatuses = Object.keys(appointmentStatus)
|
appointmentStatuses = Object.keys(appointmentStatus)
|
||||||
@ -33,12 +32,12 @@ export class ViewAppointmentComponent {
|
|||||||
label: visitType[key as unknown as keyof typeof visitType],
|
label: visitType[key as unknown as keyof typeof visitType],
|
||||||
value: Number(key),
|
value: Number(key),
|
||||||
}));
|
}));
|
||||||
paymentStatuses = Object.keys(paymentStatus)
|
paymentStatuses = Object.keys(paymentStatus)
|
||||||
.filter(key => !isNaN(Number(key)))
|
.filter(key => !isNaN(Number(key)))
|
||||||
.map(key => ({
|
.map(key => ({
|
||||||
label: paymentStatus[key as unknown as keyof typeof paymentStatus],
|
label: paymentStatus[key as unknown as keyof typeof paymentStatus],
|
||||||
value: Number(key),
|
value: Number(key),
|
||||||
}));;
|
}));
|
||||||
isEditMode: boolean = false;
|
isEditMode: boolean = false;
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
params: PagingSortResultDto;
|
params: PagingSortResultDto;
|
||||||
@ -92,8 +91,15 @@ export class ViewAppointmentComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
getGenderLabel(gender: number): string {
|
getGenderLabel(gender: number): string {
|
||||||
return gender === Gender.Male ? 'Male' : gender === Gender.Female ? 'Female' : 'Unknown';
|
return Gender[gender] ?? 'Unknown';
|
||||||
}
|
}
|
||||||
|
getStatusLabel(Status: number): string {
|
||||||
|
return appointmentStatus[Status] ?? 'Unknown';
|
||||||
|
}
|
||||||
|
getVisitTypeLabel(VisitType: number): string {
|
||||||
|
return visitType[VisitType] ?? 'Unknown';
|
||||||
|
}
|
||||||
|
|
||||||
loadappointments(event: any) {
|
loadappointments(event: any) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let order = event.sortOrder == 1 ? ' asc' : ' desc';
|
let order = event.sortOrder == 1 ? ' asc' : ' desc';
|
||||||
@ -113,7 +119,7 @@ export class ViewAppointmentComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
openNewAppointmentDialog() {
|
openNewAppointmentDialog() {
|
||||||
this.isEditing = false;
|
this.isEditMode = false;
|
||||||
this.appointmentDialog = true;
|
this.appointmentDialog = true;
|
||||||
this.appointment = {
|
this.appointment = {
|
||||||
firstName: '',
|
firstName: '',
|
||||||
@ -140,11 +146,33 @@ export class ViewAppointmentComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editAppointment(appointment: any) {
|
editAppointment(appointment: any) {
|
||||||
console.log('Editing appointment', appointment);
|
debugger;
|
||||||
|
this.isEditMode = true;
|
||||||
|
this.appointmentDialog = true;
|
||||||
|
|
||||||
|
this.AppointmentService.getAppointmentById(appointment.id).subscribe(result => {
|
||||||
|
debugger;
|
||||||
|
this.appointment = result;
|
||||||
|
this.appointment.dateOfAppointment = new Date(result.dateOfAppointment).toISOString().split('T')[0];;
|
||||||
|
this.appointment.dob = new Date(result.dob).toISOString().split('T')[0];;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAppointment(id: number) {
|
deleteAppointment(id: string) {
|
||||||
console.log('Deleting appointment with ID', id);
|
this.confirmation
|
||||||
|
.warn('Do you really want to delete this Appointment?', {
|
||||||
|
key: '::AreYouSure',
|
||||||
|
defaultValue: 'Are you sure?',
|
||||||
|
})
|
||||||
|
.subscribe((status: Confirmation.Status) => {
|
||||||
|
// your code here
|
||||||
|
if (status == 'confirm') {
|
||||||
|
this.AppointmentService.deleteAppointmentRecord(id).subscribe(() => {
|
||||||
|
this.toaster.success('Appointment deleted successfully', 'Success');
|
||||||
|
this.loadappointments(this.params);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
saveAppointment(form: NgForm) {
|
saveAppointment(form: NgForm) {
|
||||||
debugger;
|
debugger;
|
||||||
@ -154,21 +182,22 @@ export class ViewAppointmentComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.isEditMode) {
|
if (this.isEditMode) {
|
||||||
this.AppointmentService.createAppointment(this.appointment).subscribe(
|
this.AppointmentService.updateAppointment(this.appointment).subscribe(
|
||||||
() => {
|
() => {
|
||||||
this.toaster.success('Appointment updated successfully', 'Success');
|
this.toaster.success('Appointment updated successfully', 'Success');
|
||||||
this.AppointmentDialog = false;
|
this.AppointmentDialog = false;
|
||||||
// this.loadPatient({
|
this.loadappointments({
|
||||||
// first: 0,
|
first: 0,
|
||||||
// rows: 10,
|
rows: 10,
|
||||||
// sortField: 'id',
|
sortField: 'id',
|
||||||
// sortOrder: 1,
|
sortOrder: 1,
|
||||||
// globalFilter: null,
|
globalFilter: null,
|
||||||
// });
|
});
|
||||||
|
this.closeDialog();
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
this.closeDialog();
|
this.toaster.error(error.error.error.message, 'Error');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -184,12 +213,10 @@ export class ViewAppointmentComponent {
|
|||||||
globalFilter: null,
|
globalFilter: null,
|
||||||
});
|
});
|
||||||
this.closeDialog();
|
this.closeDialog();
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
this.toaster.error(error.error.error.message, 'Error');
|
this.toaster.error(error.error.error.message, 'Error');
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import { InputTextModule } from 'primeng/inputtext';
|
|||||||
import { RadioButtonModule } from 'primeng/radiobutton';
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
||||||
import { DoctorService } from '@proxy/doctors';
|
import { DoctorService } from '@proxy/doctors';
|
||||||
import { InputTextareaModule } from 'primeng/inputtextarea';
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
||||||
|
import { ChipModule } from 'primeng/chip';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [ViewAppointmentComponent],
|
declarations: [ViewAppointmentComponent],
|
||||||
@ -29,7 +30,8 @@ import { InputTextareaModule } from 'primeng/inputtextarea';
|
|||||||
CalendarModule,
|
CalendarModule,
|
||||||
DropdownModule,
|
DropdownModule,
|
||||||
RadioButtonModule,
|
RadioButtonModule,
|
||||||
InputTextareaModule
|
InputTextareaModule,
|
||||||
|
ChipModule
|
||||||
|
|
||||||
],
|
],
|
||||||
providers:[DoctorService]
|
providers:[DoctorService]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div>
|
<!-- <div>
|
||||||
<p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
|
<p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
|
||||||
[lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
|
[lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
|
||||||
[responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'status']"
|
[responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'status']"
|
||||||
@ -74,164 +74,216 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
<span>Total Records: {{totalRecords}}</span>
|
<span>Total Records: {{totalRecords}}</span>
|
||||||
|
</div> -->
|
||||||
|
<div class="container-fluid py-3">
|
||||||
|
<div class="card shadow-sm p-3">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h2 class="mb-0">Patient List</h2>
|
||||||
|
<div class="d-flex align-items-center gap-2">
|
||||||
|
<button *ngIf="createpermission" class="btn btn-success btn-sm" (click)="openNewPatientDialog()">
|
||||||
|
<i class="pi pi-plus-circle"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-warning btn-sm" (click)="exportPatient()">
|
||||||
|
<i class="pi pi-download"></i>
|
||||||
|
</button>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text"><i class="pi pi-search"></i></span>
|
||||||
|
<input pInputText type="text" class="form-control"
|
||||||
|
(input)="dt2.filterGlobal($event.target.value, 'contains')" [(ngModel)]="globalFilter"
|
||||||
|
placeholder="Search keyword" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p-table #dt2 dataKey="id" [value]="patients" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
|
||||||
|
[lazy]="true" (onLazyLoad)="loadPatient($event)" [rowsPerPageOptions]="[10, 20, 50]"
|
||||||
|
styleClass="p-datatable-gridlines" [responsiveLayout]="'scroll'"
|
||||||
|
[globalFilterFields]="['id', 'name', 'status']" [filters]="{ global: { value: '', matchMode: 'contains' } }"
|
||||||
|
class="table table-hover table-responsive-md">
|
||||||
|
|
||||||
|
<ng-template pTemplate="header">
|
||||||
|
<tr class="table-dark">
|
||||||
|
<th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
|
||||||
|
<th pSortableColumn="name">Full Name <p-sortIcon field="name" /></th>
|
||||||
|
<th pSortableColumn="gender">Gender <p-sortIcon field="gender" /></th>
|
||||||
|
<th pSortableColumn="admissionDate">Date of Admission <p-sortIcon field="admissionDate" /></th>
|
||||||
|
<th pSortableColumn="bloodGroup">Blood Group <p-sortIcon field="bloodGroup" /></th>
|
||||||
|
<th>Mobile</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th pSortableColumn="status">Status <p-sortIcon field="status" /></th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template pTemplate="body" let-patient>
|
||||||
|
<tr>
|
||||||
|
<td class="hidden">{{ patient.id }}</td>
|
||||||
|
<td>{{ patient.name }}</td>
|
||||||
|
<td>
|
||||||
|
<span class="badge" [ngClass]="patient.gender === 1 ? 'bg-primary' : 'bg-pink'">
|
||||||
|
{{ gender[patient.gender] }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>{{ patient.admissionDate | date }}</td>
|
||||||
|
<td>{{ patient.bloodGroup }}</td>
|
||||||
|
<td>{{ patient.mobile }}</td>
|
||||||
|
<td>{{ patient.email }}</td>
|
||||||
|
<td>
|
||||||
|
<span class="badge"
|
||||||
|
[ngClass]="patient.status === 1 ? 'bg-success' : (patient.status === 2 ? 'bg-primary':'bg-danger')">
|
||||||
|
{{ status[patient.status] }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="d-flex gap-1">
|
||||||
|
<button *ngIf="createpermission" class="btn btn-success btn-sm"
|
||||||
|
(click)="addnewrecord(patient.id)">
|
||||||
|
<i class="pi pi-arrow-right"></i>
|
||||||
|
</button>
|
||||||
|
<button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patient)"><i
|
||||||
|
class="pi pi-pencil"></i></button>
|
||||||
|
<button *ngIf="deletepermission" class="btn btn-danger btn-sm"
|
||||||
|
(click)="deletePatient(patient.id)"><i class="pi pi-trash"></i></button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template pTemplate="emptymessage">
|
||||||
|
<tr>
|
||||||
|
<td colspan="10" class="text-center">No Patients found.</td>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
</p-table>
|
||||||
|
<div class="text-end mt-2 fw-bold">Total Records: {{ totalRecords }}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
|
<p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
|
||||||
[closable]="true" [style]="{width: '85%', height: '100%'}">
|
[closable]="true" [style]="{width: '80%', height: 'auto'}" class="modern-dialog">
|
||||||
<form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)">
|
<form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)">
|
||||||
<div class="p-fluid">
|
<div class="p-fluid grid">
|
||||||
<div class="p-grid">
|
<!-- Full Name & Profile Image -->
|
||||||
<!-- Full Name -->
|
<div class="col-6">
|
||||||
<div class="p-col-6">
|
<div class="field">
|
||||||
<div class="field">
|
<label for="name"><i class="pi pi-user"></i> Full Name</label>
|
||||||
<label for="name">Full Name</label>
|
<input id="name" name="name" type="text" pInputText [(ngModel)]="selectedPatient.name"
|
||||||
<input id="name" name="name" type="text" pInputText [(ngModel)]="selectedPatient.name"
|
placeholder="Enter full patient name" required #name="ngModel" />
|
||||||
placeholder="Enter full patient name" required #name="ngModel" />
|
<small *ngIf="name.invalid && name.touched" class="p-error">Full Name is required</small>
|
||||||
<small *ngIf="name.invalid && name.touched" class="p-error">Full Name is required</small>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="image">Profile Image</label>
|
|
||||||
<input type="file" id="image" name="image" accept=".jpg,.png"
|
|
||||||
(change)="profileimageupload($event)" />
|
|
||||||
</div>
|
|
||||||
<small *ngIf="error !== ''" class="p-error">{{error}}</small>
|
|
||||||
<small *ngIf="imgpath !== ''">{{imgpath}} <i class="pi pi-image"></i></small>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
<!-- Mobile -->
|
<label for="image"><i class="pi pi-image"></i> Profile Image</label>
|
||||||
<div class="p-col-6">
|
<input type="file" id="image" name="image" accept=".jpg,.png"
|
||||||
<div class="field">
|
(change)="profileimageupload($event)" />
|
||||||
<label for="mobile">Mobile</label>
|
|
||||||
<input id="mobile" name="mobile" type="text" pInputText [(ngModel)]="selectedPatient.mobile"
|
|
||||||
placeholder="Enter mobile number" maxlength="10" required pattern="[0-9]{10}"
|
|
||||||
#mobile="ngModel" />
|
|
||||||
<small *ngIf="mobile.invalid && mobile.touched" class="p-error">
|
|
||||||
Mobile is required and must be 10 digits
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<small *ngIf="error !== ''" class="p-error">{{error}}</small>
|
||||||
<!-- Address -->
|
<div *ngIf="uploadProgress > 0">
|
||||||
<div class="p-col-6">
|
<p>Uploading... {{ uploadProgress }}%</p>
|
||||||
<div class="field">
|
<progress [value]="uploadProgress" max="100"></progress>
|
||||||
<label for="address">Address</label>
|
|
||||||
<input id="address" name="address" type="text" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.address" placeholder="Enter address" required
|
|
||||||
#address="ngModel" />
|
|
||||||
<small *ngIf="address.invalid && address.touched" class="p-error">Address is
|
|
||||||
required</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<small *ngIf="imgpath !== ''">{{imgpath}} <i class="pi pi-image"></i></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-grid">
|
<!-- Mobile & Address -->
|
||||||
<!-- Gender -->
|
<div class="col-6">
|
||||||
<div class="p-col-6">
|
<div class="field">
|
||||||
<div class="field">
|
<label for="mobile"><i class="pi pi-phone"></i> Mobile</label>
|
||||||
<label for="gender">Gender</label>
|
<input id="mobile" name="mobile" type="text" pInputText [(ngModel)]="selectedPatient.mobile"
|
||||||
<div>
|
placeholder="Enter mobile number" maxlength="10" required pattern="[0-9]{10}"
|
||||||
<label class="mx-1">
|
#mobile="ngModel" />
|
||||||
<input id="male" type="radio" name="gender" [(ngModel)]="selectedgender" [value]="1"
|
<small *ngIf="mobile.invalid && mobile.touched" class="p-error">
|
||||||
required />
|
Mobile is required and must be 10 digits
|
||||||
Male
|
</small>
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input id="female" type="radio" name="gender" [(ngModel)]="selectedgender"
|
|
||||||
[value]="2" />
|
|
||||||
Female
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<small *ngIf="!selectedgender" class="p-error">Gender is required</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
<!-- Admission Date -->
|
<label for="address"><i class="pi pi-map-marker"></i> Address</label>
|
||||||
<div class="p-col-6">
|
<input id="address" name="address" type="text" pInputText [(ngModel)]="selectedPatient.address"
|
||||||
<div class="field">
|
placeholder="Enter address" required #address="ngModel" />
|
||||||
<label for="admissionDate">Admission Date</label>
|
<small *ngIf="address.invalid && address.touched" class="p-error">Address is required</small>
|
||||||
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate"
|
|
||||||
showIcon styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
|
|
||||||
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
|
||||||
Admission Date is required
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="p-grid">
|
|
||||||
<!-- Doctors Note -->
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="doctorAssigned">Doctor Assigned</label>
|
|
||||||
<input id="doctorAssigned" name="doctorAssigned" type="text" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.doctorAssigned" placeholder="Enter assigned doctor" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Treatment -->
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="treatment">Treatment</label>
|
|
||||||
<input id="treatment" name="treatment" type="treatment" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.treatment" placeholder="Enter treatment" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
|
||||||
<!-- Blood Group -->
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="bloodGroup">Blood Group</label>
|
|
||||||
<input id="bloodGroup" name="bloodGroup" type="text" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.bloodGroup" placeholder="Enter blood group" required
|
|
||||||
#bloodGroup="ngModel" />
|
|
||||||
<small *ngIf="bloodGroup.invalid && bloodGroup.touched" class="p-error">Blood Group is
|
|
||||||
required</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Email -->
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="email">Email</label>
|
|
||||||
<input id="email" name="email" type="email" pInputText [(ngModel)]="selectedPatient.email"
|
|
||||||
placeholder="Enter email address" required email #email="ngModel" />
|
|
||||||
<small *ngIf="email.invalid && email.touched" class="p-error">Enter a valid email
|
|
||||||
address</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
|
||||||
<!-- Age -->
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="age">Age</label>
|
|
||||||
<input id="age" name="age" type="number" pInputText [(ngModel)]="selectedPatient.age"
|
|
||||||
placeholder="Enter age" required min="1" max="120" #age="ngModel" />
|
|
||||||
<small *ngIf="age.invalid && age.touched" class="p-error">
|
|
||||||
Age is required and must be between 1 and 90
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Status -->
|
|
||||||
<div class="p-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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="p-fluid grid">
|
||||||
|
<!-- Gender & Admission Date -->
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="gender"><i class="pi pi-users"></i> Gender</label>
|
||||||
|
<div>
|
||||||
|
<label class="mx-1">
|
||||||
|
<input id="male" type="radio" name="gender" [(ngModel)]="selectedgender" [value]="1"
|
||||||
|
required />
|
||||||
|
Male
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input id="female" type="radio" name="gender" [(ngModel)]="selectedgender"
|
||||||
|
[value]="2" />
|
||||||
|
Female
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<small *ngIf="!selectedgender" class="p-error">Gender is required</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
||||||
|
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectadmissionDate" showIcon
|
||||||
|
styleClass="small-calendar" required #admissionDate="ngModel"></p-calendar>
|
||||||
|
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
||||||
|
Admission Date is required
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-fluid grid">
|
||||||
|
<!-- Doctor & Treatment -->
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="doctorAssigned"><i class="pi pi-user-md"></i> Doctor Assigned</label>
|
||||||
|
<input id="doctorAssigned" name="doctorAssigned" type="text" pInputText
|
||||||
|
[(ngModel)]="selectedPatient.doctorAssigned" placeholder="Enter assigned doctor" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="treatment"><i class="pi pi-heartbeat"></i> Treatment</label>
|
||||||
|
<input id="treatment" name="treatment" type="text" pInputText
|
||||||
|
[(ngModel)]="selectedPatient.treatment" placeholder="Enter treatment" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-fluid grid">
|
||||||
|
<!-- Blood Group & Email -->
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="bloodGroup"><i class="pi pi-tint"></i> Blood Group</label>
|
||||||
|
<input id="bloodGroup" name="bloodGroup" type="text" pInputText
|
||||||
|
[(ngModel)]="selectedPatient.bloodGroup" placeholder="Enter blood group" required
|
||||||
|
#bloodGroup="ngModel" />
|
||||||
|
<small *ngIf="bloodGroup.invalid && bloodGroup.touched" class="p-error">Blood Group is
|
||||||
|
required</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="email"><i class="pi pi-envelope"></i> Email</label>
|
||||||
|
<input id="email" name="email" type="email" pInputText [(ngModel)]="selectedPatient.email"
|
||||||
|
placeholder="Enter email address" required email #email="ngModel" />
|
||||||
|
<small *ngIf="email.invalid && email.touched" class="p-error">Enter a valid email
|
||||||
|
address</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-right">
|
||||||
<button type="submit" pButton class="btn btn-primary"
|
<button type="submit" pButton class="btn btn-primary"
|
||||||
[disabled]="(patientrecord.invalid || selectedstatus === 0 || !selectedgender)">Save</button>
|
[disabled]="(patientrecord.invalid || selectedstatus === 0 || !selectedgender)">
|
||||||
<button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">Close</button>
|
<i class="pi pi-check"></i> Save
|
||||||
|
</button>
|
||||||
|
<button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">
|
||||||
|
<i class="pi pi-times"></i> Close
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p-dialog>
|
</p-dialog>
|
||||||
|
@ -25,4 +25,13 @@
|
|||||||
color: red;
|
color: red;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-pink {
|
||||||
|
background-color: #ff4081 !important;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap-1 {
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import { PermissionService } from '@abp/ng.core';
|
import { PermissionService } from '@abp/ng.core';
|
||||||
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, HttpEventType, HttpParams, HttpRequest } from '@angular/common/http';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { NgForm } from '@angular/forms';
|
import { NgForm } from '@angular/forms';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
@ -8,6 +8,7 @@ import { PagingSortResultDto } from '@proxy/dto';
|
|||||||
import { Gender, Status } from '@proxy/global-enum';
|
import { Gender, Status } from '@proxy/global-enum';
|
||||||
import { PatientService } from '@proxy/patients';
|
import { PatientService } from '@proxy/patients';
|
||||||
import { PatientDto, CreateUpdatePatientDto } from '@proxy/patients/dto';
|
import { PatientDto, CreateUpdatePatientDto } from '@proxy/patients/dto';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-all-patients',
|
selector: 'app-all-patients',
|
||||||
@ -38,18 +39,7 @@ export class AllPatientsComponent implements OnInit {
|
|||||||
error: string = '';
|
error: string = '';
|
||||||
imgpath: string = '';
|
imgpath: string = '';
|
||||||
guid: string = '00000000-0000-0000-0000-000000000000';
|
guid: string = '00000000-0000-0000-0000-000000000000';
|
||||||
options: Partial<Confirmation.Options> = {
|
uploadProgress = 0;
|
||||||
hideCancelBtn: false,
|
|
||||||
hideYesBtn: false,
|
|
||||||
dismissible: false,
|
|
||||||
cancelText: 'Close',
|
|
||||||
// yesText: 'Confirm',
|
|
||||||
messageLocalizationParams: ['Demo'],
|
|
||||||
titleLocalizationParams: [],
|
|
||||||
// You can customize icon
|
|
||||||
// icon: 'fa fa-exclamation-triangle', // or
|
|
||||||
// iconTemplate : '<img src="custom-image-path.jpg" alt=""/>'
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private patientService: PatientService,
|
private patientService: PatientService,
|
||||||
@ -103,6 +93,7 @@ export class AllPatientsComponent implements OnInit {
|
|||||||
this.imgpath = '';
|
this.imgpath = '';
|
||||||
this.selectedgender = 0;
|
this.selectedgender = 0;
|
||||||
this.selectedstatus = 0;
|
this.selectedstatus = 0;
|
||||||
|
this.uploadProgress = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPatient(event: any) {
|
loadPatient(event: any) {
|
||||||
@ -167,6 +158,7 @@ export class AllPatientsComponent implements OnInit {
|
|||||||
this.error = 'Please Type a Name';
|
this.error = 'Please Type a Name';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.error = '';
|
||||||
const input = event.target as HTMLInputElement;
|
const input = event.target as HTMLInputElement;
|
||||||
if (input.files.length > 0) {
|
if (input.files.length > 0) {
|
||||||
const tag = 'Image';
|
const tag = 'Image';
|
||||||
@ -174,14 +166,40 @@ export class AllPatientsComponent implements OnInit {
|
|||||||
formdata.append('file', input.files[0]);
|
formdata.append('file', input.files[0]);
|
||||||
this.UploadFileData(tag, formdata);
|
this.UploadFileData(tag, formdata);
|
||||||
} else {
|
} else {
|
||||||
|
this.uploadProgress = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UploadFileData(tag: string, formdata: FormData) {
|
UploadFileData(tag: string, formdata: FormData) {
|
||||||
this.patientService.uploadFile(tag, formdata).subscribe(result => {
|
// this.patientService.uploadFile(tag, formdata).subscribe(result => {
|
||||||
this.selectedPatient.imageID = result;
|
// this.selectedPatient.imageID = result;
|
||||||
});
|
// });
|
||||||
|
const req = new HttpRequest(
|
||||||
|
'POST',
|
||||||
|
environment.apis.default.url + '/api/app/patient/upload-file',
|
||||||
|
formdata,
|
||||||
|
{
|
||||||
|
reportProgress: true,
|
||||||
|
responseType: 'text',
|
||||||
|
params: new HttpParams().set('tagName', tag),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.http.request(req).subscribe(
|
||||||
|
event => {
|
||||||
|
if (event.type === HttpEventType.UploadProgress) {
|
||||||
|
this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
|
||||||
|
console.log(event.type, this.uploadProgress);
|
||||||
|
} else if (event.type === HttpEventType.Response) {
|
||||||
|
this.uploadProgress = 100;
|
||||||
|
this.selectedPatient.imageID = event.body.toString();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.error('Upload failed', error);
|
||||||
|
this.uploadProgress = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
editPatient(Patient: any) {
|
editPatient(Patient: any) {
|
||||||
|
@ -52,30 +52,27 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="mt-4">
|
||||||
<p-table #dt2 dataKey="id" [value]="patientrecords" [paginator]="true" [rows]="10" [totalRecords]="totalRecords"
|
<p-table #dt2 [value]="patientrecords" [paginator]="true" [rows]="10" [totalRecords]="totalRecords" [lazy]="true"
|
||||||
[lazy]="true" (onLazyLoad)="loadPatient($event,patientId)" [rowsPerPageOptions]="[10, 20, 50]"
|
(onLazyLoad)="loadPatient($event,patientId)" [rowsPerPageOptions]="[10, 20, 50]" [responsiveLayout]="'scroll'"
|
||||||
[responsiveLayout]="'scroll'" [globalFilterFields]="['id', 'name', 'diagnosis']"
|
[globalFilterFields]="['id', 'name', 'diagnosis']" class="card shadow-sm">
|
||||||
[filters]="{ global: { value: '', matchMode: 'contains' } }" class="table table-striped">
|
|
||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="flex">
|
<div class="flex justify-content-between align-items-center">
|
||||||
<h2 class="mr-auto">{{'::PatientHeader' | abpLocalization}}</h2>
|
<h3>{{'::PatientHeader' | abpLocalization}}</h3>
|
||||||
<div>
|
<div class="flex gap-2">
|
||||||
<button *ngIf="createpermission" pButton class="p-button-rounded p-button-success ml-2"
|
<button *ngIf="createpermission" pButton class="p-button-rounded p-button-success"
|
||||||
(click)="openNewPatientDialog()">
|
(click)="openNewPatientDialog()">
|
||||||
<i class="pi pi-plus-circle"></i>
|
<i class="pi pi-plus-circle"></i>
|
||||||
</button>
|
</button>
|
||||||
<button pButton class="p-button-rounded p-button-warning ml-2" (click)="exportPatient()">
|
<button pButton class="p-button-rounded p-button-warning" (click)="exportPatient()">
|
||||||
<i class="pi pi-download"></i>
|
<i class="pi pi-download"></i>
|
||||||
</button>
|
</button>
|
||||||
<p-iconField iconPosition="right" class="ml-2">
|
<span class="p-input-icon-left">
|
||||||
<p-inputIcon>
|
<i class="pi pi-search"></i>
|
||||||
<i class="pi pi-search"></i>
|
<input pInputText type="text" [(ngModel)]="globalFilter"
|
||||||
</p-inputIcon>
|
(input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search...">
|
||||||
<input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')"
|
</span>
|
||||||
[(ngModel)]="globalFilter" placeholder="Search keyword" />
|
|
||||||
</p-iconField>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -83,14 +80,14 @@
|
|||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
|
<th class="hidden" pSortableColumn="id">Patient ID <p-sortIcon field="id" /></th>
|
||||||
<th pSortableColumn="fullName">Full Name <p-sortIcon field="fullName" /></th>
|
<th>Full Name</th>
|
||||||
<th pSortableColumn="gender">Gender <p-sortIcon field="fullName" /></th>
|
<th>Gender</th>
|
||||||
<th pSortableColumn="dateOfAdmission">Date of Admission <p-sortIcon field="dateOfAdmission" /></th>
|
<th pSortableColumn="dateOfAdmission">Date of Admission <p-sortIcon field="dateOfAdmission" /></th>
|
||||||
<th pSortableColumn="diagnosis">Diagnosis <p-sortIcon field="diagnosis" /></th>
|
<th pSortableColumn="diagnosis">Diagnosis <p-sortIcon field="diagnosis" /></th>
|
||||||
<th>Lab Reports</th>
|
<th>Lab Reports</th>
|
||||||
<th>Medications</th>
|
<th>Medications</th>
|
||||||
<th pSortableColumn="nextFollowUp">Next Follow-Up <p-sortIcon field="nextFollowUp" /></th>
|
<th pSortableColumn="nextFollowUp">Next Follow-Up <p-sortIcon field="nextFollowUp" /></th>
|
||||||
<th pSortableColumn="status">Status <p-sortIcon field="status" /></th>
|
<th>Status</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -106,173 +103,141 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ patientrecord.dateOfAdmission | date }}</td>
|
<td>{{ patientrecord.dateOfAdmission | date }}</td>
|
||||||
<td>{{ patientrecord.diagnosis }}</td>
|
<td>{{ patientrecord.diagnosis }}</td>
|
||||||
<td><i class="pi pi-file-pdf pdf-icon"></i></td>
|
<td><i class="pi pi-file-pdf text-danger"></i></td>
|
||||||
<td><i class="pi pi-file-pdf pdf-icon"></i></td>
|
<td><i class="pi pi-file-pdf text-primary"></i></td>
|
||||||
<td>{{ patientrecord.nextFollowUp | date }}</td>
|
<td>{{ patientrecord.nextFollowUp | date }}</td>
|
||||||
<td>{{ status[patientrecord.patients.status] }}</td>
|
<td>
|
||||||
<td class="d-flex">
|
<span class="badge"
|
||||||
<button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patientrecord)"><i
|
[ngClass]="patientrecord.patients.status === 1 ? 'bg-success' : (patientrecord.patients.status === 2 ? 'bg-primary':'bg-danger')">
|
||||||
class="pi pi-pencil"></i></button>
|
{{ status[patientrecord.patients.status] }}
|
||||||
<button *ngIf="deletepermission" class="btn btn-danger btn-sm ml-1"
|
</span>
|
||||||
(click)="deletePatient(patientrecord.id)"><i class="pi pi-trash"></i></button>
|
</td>
|
||||||
|
<td class="flex gap-2">
|
||||||
|
<button *ngIf="editpermission" class="btn btn-warning btn-sm" (click)="editPatient(patientrecord)">
|
||||||
|
<i class="pi pi-pencil"></i>
|
||||||
|
</button>
|
||||||
|
<button *ngIf="deletepermission" class="btn btn-danger btn-sm" (click)="deletePatient(patientrecord.id)">
|
||||||
|
<i class="pi pi-trash"></i>
|
||||||
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="emptymessage">
|
<ng-template pTemplate="emptymessage">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="11">No Patients found.</td>
|
<td colspan="9">No Patients found.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
<span>Total Records: {{totalRecords}}</span>
|
<div class="mt-2">Total Records: {{totalRecords}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
|
<p-dialog *ngIf="patientDialog" header="{{patientDialogTitle}}" [(visible)]="patientDialog" [modal]="true"
|
||||||
[closable]="true" [style]="{width: '85%', height: '100%'}">
|
[closable]="true" [style]="{width: '70%', height: 'auto'}">
|
||||||
<form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)" novalidate>
|
<form #patientrecord="ngForm" (ngSubmit)="savePatient(patientrecord)" novalidate>
|
||||||
<div class="p-fluid">
|
<div class="p-fluid grid">
|
||||||
<div class="p-grid">
|
|
||||||
<!-- <div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="fullname">Full Name</label>
|
|
||||||
<input id="fullname" name="fullname" type="text" autocomplete="off" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.fullName" placeholder="Enter full patient name" required
|
|
||||||
#fullname="ngModel" />
|
|
||||||
<small *ngIf="fullname.invalid && fullname.touched" class="p-error">
|
|
||||||
Full Name is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="mobile">Mobile</label>
|
|
||||||
<input id="mobile" name="mobile" type="text" autocomplete="off" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.mobile" maxlength="10" pattern="^[0-9]{10}$"
|
|
||||||
placeholder="Enter mobile number" required #mobile="ngModel" />
|
|
||||||
<small *ngIf="mobile.invalid && mobile.touched" class="p-error">
|
|
||||||
Mobile number is required and must be 10 digits.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
<!-- Admission Date -->
|
||||||
<div class="p-col-6">
|
<div class="col-6">
|
||||||
<!-- <div class="field">
|
<div class="field">
|
||||||
<label for="gender">Gender</label>
|
<label for="admissionDate"><i class="pi pi-calendar"></i> Admission Date</label>
|
||||||
<div>
|
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
|
||||||
<label class="mx-1">
|
#admissionDate="ngModel"></p-calendar>
|
||||||
<input style="background-color: #fff;" id="male" type="radio" name="gender"
|
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
||||||
[(ngModel)]="selectedgender" [value]="1" required #gender="ngModel" />
|
Admission Date is required.
|
||||||
Male
|
</small>
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input style="background-color: #fff;" id="female" type="radio" name="gender"
|
|
||||||
[(ngModel)]="selectedgender" [value]="2" required />
|
|
||||||
Female
|
|
||||||
</label>
|
|
||||||
<small *ngIf="!selectedgender" class="p-error">
|
|
||||||
Please select a gender.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="admissionDate">Admission Date</label>
|
|
||||||
<p-calendar id="admissionDate" name="admissionDate" [(ngModel)]="selectdateOfAdmission" showIcon required
|
|
||||||
#admissionDate="ngModel"></p-calendar>
|
|
||||||
<small *ngIf="admissionDate.invalid && admissionDate.touched" class="p-error">
|
|
||||||
Admission Date is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-grid">
|
<!-- Next Follow-Up Date -->
|
||||||
<div class="p-col-6">
|
<div class="col-6">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="labReport">Lab Report</label>
|
<label for="nextFollowUp"><i class="pi pi-calendar-plus"></i> Next Follow-Up Date</label>
|
||||||
<input type="file" id="labReport" name="labReport" accept=".pdf,.doc,.docx"
|
<p-calendar id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
|
||||||
(change)="handleLabReportUpload($event)" />
|
#nextFollowUp="ngModel"></p-calendar>
|
||||||
</div>
|
<small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
|
||||||
<small *ngIf="labReportUrlpath !==''">{{labReportUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
|
Next Follow-Up Date is required.
|
||||||
</div>
|
</small>
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="medications">Medications</label>
|
|
||||||
<input type="file" id="medications" name="medications" accept=".pdf,.doc,.docx"
|
|
||||||
(change)="handleMedicationsUpload($event)" />
|
|
||||||
</div>
|
|
||||||
<small *ngIf="medicationUrlpath !==''">{{medicationUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="medicationHistory">Medication History</label>
|
|
||||||
<input type="file" id="medicationHistory" name="medicationHistory" accept=".pdf,.doc,.docx"
|
|
||||||
(change)="handleMedicationHistoryUpload($event)" />
|
|
||||||
</div>
|
|
||||||
<small *ngIf="medicationHistoryUrlpath !==''">{{medicationHistoryUrlpath}} <i class="pi pi-file-pdf pdf-icon"></i></small>
|
|
||||||
</div>
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="nextFollowUp">Next FollowUp Date</label>
|
|
||||||
<p-calendar id="nextFollowUp" name="nextFollowUp" [(ngModel)]="selectnextFollowUp" showIcon required
|
|
||||||
#nextFollowUp="ngModel"></p-calendar>
|
|
||||||
<small *ngIf="nextFollowUp.invalid && nextFollowUp.touched" class="p-error">
|
|
||||||
Next Follow-Up Date is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
|
||||||
<div class="p-col-12">
|
|
||||||
<div class="field">
|
|
||||||
<div>
|
|
||||||
<label for="diagnosis">Diagnosis</label>
|
|
||||||
</div>
|
|
||||||
<textarea style="width: 100%; background-color: #fff; color: black;" id="diagnosis" name="diagnosis"
|
|
||||||
pInputTextarea rows="5" cols="30" [(ngModel)]="selectedPatient.diagnosis" required
|
|
||||||
#diagnosis="ngModel"></textarea>
|
|
||||||
<small *ngIf="diagnosis.invalid && diagnosis.touched" class="p-error">
|
|
||||||
Diagnosis is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-grid">
|
|
||||||
<div class="p-col-6">
|
|
||||||
<div class="field">
|
|
||||||
<label for="insuranceProvider">Insurance Provider</label>
|
|
||||||
<input id="insuranceProvider" name="insuranceProvider" type="text" autocomplete="off" pInputText
|
|
||||||
[(ngModel)]="selectedPatient.insuranceProvider" required placeholder="Enter insurance provider"
|
|
||||||
#insurance="ngModel" />
|
|
||||||
<small *ngIf="insurance.invalid && insurance.touched" class="p-error">
|
|
||||||
Insurance is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="p-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
|
|
||||||
#status="ngModel"></p-dropdown>
|
|
||||||
<small *ngIf="selectedstatus === 0" class="p-error">
|
|
||||||
Status is required.
|
|
||||||
</small>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<button type="submit" pButton class="btn btn-primary" [disabled]="patientrecord.invalid">Save</button>
|
<!-- File Uploads -->
|
||||||
<button pButton class="btn btn-secondary ml-1" (click)="closeDialog()">Close</button>
|
<div class="p-fluid grid">
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="labReport"><i class="pi pi-file-pdf"></i> Lab Report</label>
|
||||||
|
<input type="file" id="labReport" name="labReport" accept=".pdf,.doc,.docx"
|
||||||
|
(change)="handleUpload($event,'Lab-Report')" />
|
||||||
|
<div *ngIf="uploadProgress1 > 0">
|
||||||
|
<p>Uploading... {{ uploadProgress1 }}%</p>
|
||||||
|
<progress [value]="uploadProgress1" max="100"></progress>
|
||||||
|
</div>
|
||||||
|
<small *ngIf="labReportUrlpath!==''">{{labReportUrlpath}} <i class="pi pi-file"></i></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="medications"><i class="pi pi-file-pdf"></i> Medications</label>
|
||||||
|
<input type="file" id="medications" name="medications" accept=".pdf,.doc,.docx"
|
||||||
|
(change)="handleUpload($event,'Medication')" />
|
||||||
|
<div *ngIf="uploadProgress2 > 0">
|
||||||
|
<p>Uploading... {{ uploadProgress2 }}%</p>
|
||||||
|
<progress [value]="uploadProgress2" max="100"></progress>
|
||||||
|
</div>
|
||||||
|
<small *ngIf="medicationUrlpath!==''">{{medicationUrlpath}} <i class="pi pi-file"></i></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="field">
|
||||||
|
<label for="medicationHistory"><i class="pi pi-file-pdf"></i>Medication History</label>
|
||||||
|
<input type="file" id="medicationHistory" name="medicationHistory" accept=".pdf,.doc,.docx"
|
||||||
|
(change)="handleUpload($event,'Medication-History')" />
|
||||||
|
<div *ngIf="uploadProgress3 > 0">
|
||||||
|
<p>Uploading... {{ uploadProgress3 }}%</p>
|
||||||
|
<progress [value]="uploadProgress3" max="100"></progress>
|
||||||
|
</div>
|
||||||
|
<small *ngIf="medicationHistoryUrlpath !==''">{{medicationHistoryUrlpath}} <i
|
||||||
|
class="pi pi-file-pdf pdf-icon"></i></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Diagnosis -->
|
||||||
|
<div class="p-fluid">
|
||||||
|
<div class="field">
|
||||||
|
<label for="diagnosis"><i class="pi pi-heartbeat"></i> Diagnosis</label>
|
||||||
|
<textarea style="width: 100%; background-color: #fff; color: black;" id="diagnosis" name="diagnosis"
|
||||||
|
pInputTextarea rows="5" cols="30" [(ngModel)]="selectedPatient.diagnosis" required
|
||||||
|
#diagnosis="ngModel"></textarea>
|
||||||
|
<small *ngIf="diagnosis.invalid && diagnosis.touched" class="p-error">
|
||||||
|
Diagnosis is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Insurance Provider -->
|
||||||
|
<div class="p-fluid">
|
||||||
|
<div class="field">
|
||||||
|
<label for="insuranceProvider"><i class="pi pi-credit-card"></i> Insurance Provider</label>
|
||||||
|
<input id="insuranceProvider" name="insuranceProvider" type="text" pInputText
|
||||||
|
[(ngModel)]="selectedPatient.insuranceProvider" required placeholder="Enter insurance provider"
|
||||||
|
#insurance="ngModel" />
|
||||||
|
<small *ngIf="insurance.invalid && insurance.touched" class="p-error">
|
||||||
|
Insurance is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<div class="p-dialog-footer flex justify-content-end">
|
||||||
|
<button type="submit" pButton class="btn btn-primary" [disabled]="patientrecord.invalid">
|
||||||
|
<i class="pi pi-check"></i> Save
|
||||||
|
</button>
|
||||||
|
<button pButton class="btn btn-secondary ml-2" (click)="closeDialog()">
|
||||||
|
<i class="pi pi-times"></i> Close
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p-dialog>
|
</p-dialog>
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.female {
|
.female {
|
||||||
background-color: purple;
|
background-color: #ff4081 !important;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pdf-icon {
|
.pdf-icon {
|
||||||
|
@ -8,6 +8,7 @@ import { PermissionService } from '@abp/ng.core';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
||||||
|
import { HttpClient, HttpEventType, HttpParams, HttpRequest } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-patient-record',
|
selector: 'app-patient-record',
|
||||||
@ -40,18 +41,9 @@ export class PatientRecordComponent implements OnInit {
|
|||||||
medicationHistoryUrlpath: string;
|
medicationHistoryUrlpath: string;
|
||||||
medicationUrlpath: string;
|
medicationUrlpath: string;
|
||||||
guid: string = '00000000-0000-0000-0000-000000000000';
|
guid: string = '00000000-0000-0000-0000-000000000000';
|
||||||
options: Partial<Confirmation.Options> = {
|
uploadProgress1 = 0;
|
||||||
hideCancelBtn: false,
|
uploadProgress2 = 0;
|
||||||
hideYesBtn: false,
|
uploadProgress3 = 0;
|
||||||
dismissible: false,
|
|
||||||
cancelText: 'Close',
|
|
||||||
yesText: 'Confirm',
|
|
||||||
messageLocalizationParams: ['Demo'],
|
|
||||||
titleLocalizationParams: [],
|
|
||||||
// You can customize icon
|
|
||||||
// icon: 'fa fa-exclamation-triangle', // or
|
|
||||||
// iconTemplate : '<img src="custom-image-path.jpg" alt=""/>'
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private patientService: PatientService,
|
private patientService: PatientService,
|
||||||
@ -59,7 +51,8 @@ export class PatientRecordComponent implements OnInit {
|
|||||||
private permissionChecker: PermissionService,
|
private permissionChecker: PermissionService,
|
||||||
private toaster: ToasterService,
|
private toaster: ToasterService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router
|
private router: Router,
|
||||||
|
private http: HttpClient
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -103,6 +96,9 @@ export class PatientRecordComponent implements OnInit {
|
|||||||
this.medicationHistoryUrlpath = '';
|
this.medicationHistoryUrlpath = '';
|
||||||
this.selectdateOfAdmission = new Date();
|
this.selectdateOfAdmission = new Date();
|
||||||
this.selectnextFollowUp = new Date();
|
this.selectnextFollowUp = new Date();
|
||||||
|
this.uploadProgress1 = 0;
|
||||||
|
this.uploadProgress2 = 0;
|
||||||
|
this.uploadProgress3 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPatient(event: any, id: any) {
|
loadPatient(event: any, id: any) {
|
||||||
@ -122,7 +118,6 @@ export class PatientRecordComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.patientService.getPatientRecordList(this.params, id).subscribe(data => {
|
this.patientService.getPatientRecordList(this.params, id).subscribe(data => {
|
||||||
this.patientrecords = data.items;
|
this.patientrecords = data.items;
|
||||||
// console.log(data.items);
|
|
||||||
this.totalRecords = data.totalCount;
|
this.totalRecords = data.totalCount;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -201,50 +196,113 @@ export class PatientRecordComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLabReportUpload(event: Event): void {
|
handleUpload(event: Event, tag: string): void {
|
||||||
const input = event.target as HTMLInputElement;
|
const input = event.target as HTMLInputElement;
|
||||||
if (input && input.files) {
|
if (input.files.length > 0) {
|
||||||
const tag = 'Lab-Report';
|
|
||||||
const formdata = new FormData();
|
const formdata = new FormData();
|
||||||
formdata.append('file', input.files[0]);
|
formdata.append('file', input.files[0]);
|
||||||
this.UploadFileData(tag, formdata);
|
this.UploadFileData(tag, formdata);
|
||||||
|
} else {
|
||||||
|
this.uploadProgress1 = 0;
|
||||||
|
this.uploadProgress2 = 0;
|
||||||
|
this.uploadProgress3 = 0;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMedicationsUpload(event: any): void {
|
// handleLabReportUpload(event: Event): void {
|
||||||
const input = event.target as HTMLInputElement;
|
// const input = event.target as HTMLInputElement;
|
||||||
if (input && input.files) {
|
// if (input && input.files) {
|
||||||
const tag = 'Medication';
|
// const tag = 'Lab-Report';
|
||||||
const formdata = new FormData();
|
// const formdata = new FormData();
|
||||||
formdata.append('file', input.files[0]);
|
// formdata.append('file', input.files[0]);
|
||||||
this.UploadFileData(tag, formdata);
|
// this.UploadFileData(tag, formdata);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
handleMedicationHistoryUpload(event: any): void {
|
// handleMedicationsUpload(event: any): void {
|
||||||
const input = event.target as HTMLInputElement;
|
// const input = event.target as HTMLInputElement;
|
||||||
if (input && input.files) {
|
// if (input && input.files) {
|
||||||
const tag = 'Medication-History';
|
// const tag = 'Medication';
|
||||||
const formdata = new FormData();
|
// const formdata = new FormData();
|
||||||
formdata.append('file', input.files[0]);
|
// formdata.append('file', input.files[0]);
|
||||||
this.UploadFileData(tag, formdata);
|
// this.UploadFileData(tag, formdata);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// handleMedicationHistoryUpload(event: any): void {
|
||||||
|
// const input = event.target as HTMLInputElement;
|
||||||
|
// if (input && input.files) {
|
||||||
|
// const tag = 'Medication-History';
|
||||||
|
// const formdata = new FormData();
|
||||||
|
// formdata.append('file', input.files[0]);
|
||||||
|
// this.UploadFileData(tag, formdata);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
UploadFileData(tag: string, formdata: FormData) {
|
UploadFileData(tag: string, formdata: FormData) {
|
||||||
this.patientService.uploadFile(tag, formdata).subscribe(result => {
|
// this.patientService.uploadFile(tag, formdata).subscribe(result => {
|
||||||
switch (tag) {
|
// switch (tag) {
|
||||||
case 'Lab-Report':
|
// case 'Lab-Report':
|
||||||
this.selectedPatient.labReportUrlID = result;
|
// this.selectedPatient.labReportUrlID = result;
|
||||||
break;
|
// break;
|
||||||
case 'Medication':
|
// case 'Medication':
|
||||||
this.selectedPatient.medicationUrlID = result;
|
// this.selectedPatient.medicationUrlID = result;
|
||||||
break;
|
// break;
|
||||||
case 'Medication-History':
|
// case 'Medication-History':
|
||||||
this.selectedPatient.medicationHistoryUrlID = result;
|
// this.selectedPatient.medicationHistoryUrlID = result;
|
||||||
break;
|
// break;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
const req = new HttpRequest(
|
||||||
|
'POST',
|
||||||
|
environment.apis.default.url + '/api/app/patient/upload-file',
|
||||||
|
formdata,
|
||||||
|
{
|
||||||
|
reportProgress: true,
|
||||||
|
responseType: 'text',
|
||||||
|
params: new HttpParams().set('tagName', tag),
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
this.http.request(req).subscribe(
|
||||||
|
event => {
|
||||||
|
if (event.type === HttpEventType.UploadProgress) {
|
||||||
|
// this.uploadProgress = Math.round((event.loaded / event.total!) * 100);
|
||||||
|
switch (tag) {
|
||||||
|
case 'Lab-Report':
|
||||||
|
this.uploadProgress1 = Math.round((event.loaded / event.total!) * 100);
|
||||||
|
break;
|
||||||
|
case 'Medication':
|
||||||
|
this.uploadProgress2 = Math.round((event.loaded / event.total!) * 100);
|
||||||
|
break;
|
||||||
|
case 'Medication-History':
|
||||||
|
this.uploadProgress3 = Math.round((event.loaded / event.total!) * 100);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (event.type === HttpEventType.Response) {
|
||||||
|
switch (tag) {
|
||||||
|
case 'Lab-Report':
|
||||||
|
this.uploadProgress1 = 100;
|
||||||
|
this.selectedPatient.labReportUrlID = event.body.toString();
|
||||||
|
break;
|
||||||
|
case 'Medication':
|
||||||
|
this.uploadProgress2 = 100;
|
||||||
|
this.selectedPatient.medicationUrlID = event.body.toString();
|
||||||
|
break;
|
||||||
|
case 'Medication-History':
|
||||||
|
this.uploadProgress3 = 100;
|
||||||
|
this.selectedPatient.medicationHistoryUrlID = event.body.toString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.error('Upload failed', error);
|
||||||
|
this.uploadProgress1 = 100;
|
||||||
|
this.uploadProgress2 = 100;
|
||||||
|
this.uploadProgress3 = 100;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
savePatient(form: NgForm) {
|
savePatient(form: NgForm) {
|
||||||
|
@ -17,6 +17,10 @@ export interface AppointmentDto {
|
|||||||
timeOfAppointment?: string;
|
timeOfAppointment?: string;
|
||||||
injuryORContion?: string;
|
injuryORContion?: string;
|
||||||
note?: string;
|
note?: string;
|
||||||
|
insuranceProvider?: string;
|
||||||
|
appointmentStatus: appointmentStatus;
|
||||||
|
visitType: visitType;
|
||||||
|
paymentStatus: paymentStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateOrUpdateAppointmentDto {
|
export interface CreateOrUpdateAppointmentDto {
|
||||||
|
@ -3,7 +3,6 @@ import { Injectable } from '@angular/core';
|
|||||||
import type { PagedResultDto } from '../abp/application/services/dto/models';
|
import type { PagedResultDto } from '../abp/application/services/dto/models';
|
||||||
import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
|
import type { AppointmentDto, CreateOrUpdateAppointmentDto } from '../appoinments/dto/models';
|
||||||
import type { PagingSortResultDto } from '../dto/models';
|
import type { PagingSortResultDto } from '../dto/models';
|
||||||
import type { PatientRecordDto } from '../patients/dto/models';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
@ -21,6 +20,14 @@ export class AppointmentService {
|
|||||||
{ apiName: this.apiName,...config });
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
|
deleteAppointmentRecord = (id: string, config?: Partial<Rest.Config>) =>
|
||||||
|
this.restService.request<any, void>({
|
||||||
|
method: 'DELETE',
|
||||||
|
url: `/api/app/appointment/${id}/appointment-record`,
|
||||||
|
},
|
||||||
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
get = (config?: Partial<Rest.Config>) =>
|
get = (config?: Partial<Rest.Config>) =>
|
||||||
this.restService.request<any, string>({
|
this.restService.request<any, string>({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -30,6 +37,14 @@ export class AppointmentService {
|
|||||||
{ apiName: this.apiName,...config });
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
|
getAppointmentById = (id: string, config?: Partial<Rest.Config>) =>
|
||||||
|
this.restService.request<any, AppointmentDto>({
|
||||||
|
method: 'GET',
|
||||||
|
url: `/api/app/appointment/${id}/appointment-by-id`,
|
||||||
|
},
|
||||||
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
getAppointmentList = (input: PagingSortResultDto, config?: Partial<Rest.Config>) =>
|
getAppointmentList = (input: PagingSortResultDto, config?: Partial<Rest.Config>) =>
|
||||||
this.restService.request<any, PagedResultDto<AppointmentDto>>({
|
this.restService.request<any, PagedResultDto<AppointmentDto>>({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -39,10 +54,10 @@ export class AppointmentService {
|
|||||||
{ apiName: this.apiName,...config });
|
{ apiName: this.apiName,...config });
|
||||||
|
|
||||||
|
|
||||||
updateAppointment = (id: string, input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
updateAppointment = (input: CreateOrUpdateAppointmentDto, config?: Partial<Rest.Config>) =>
|
||||||
this.restService.request<any, PatientRecordDto>({
|
this.restService.request<any, AppointmentDto>({
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
url: `/api/app/appointment/${id}/appointment`,
|
url: '/api/app/appointment/appointment',
|
||||||
body: input,
|
body: input,
|
||||||
},
|
},
|
||||||
{ apiName: this.apiName,...config });
|
{ apiName: this.apiName,...config });
|
||||||
|
@ -985,6 +985,43 @@
|
|||||||
"allowAnonymous": null,
|
"allowAnonymous": null,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
},
|
},
|
||||||
|
"GetAppointmentByIdAsyncById": {
|
||||||
|
"uniqueName": "GetAppointmentByIdAsyncById",
|
||||||
|
"name": "GetAppointmentByIdAsync",
|
||||||
|
"httpMethod": "GET",
|
||||||
|
"url": "api/app/appointment/{id}/appointment-by-id",
|
||||||
|
"supportedVersions": [],
|
||||||
|
"parametersOnMethod": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"typeAsString": "System.Guid, System.Private.CoreLib",
|
||||||
|
"type": "System.Guid",
|
||||||
|
"typeSimple": "string",
|
||||||
|
"isOptional": false,
|
||||||
|
"defaultValue": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"nameOnMethod": "id",
|
||||||
|
"name": "id",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "System.Guid",
|
||||||
|
"typeSimple": "string",
|
||||||
|
"isOptional": false,
|
||||||
|
"defaultValue": null,
|
||||||
|
"constraintTypes": [],
|
||||||
|
"bindingSourceId": "Path",
|
||||||
|
"descriptorName": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"returnValue": {
|
||||||
|
"type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
|
||||||
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
|
||||||
|
},
|
||||||
|
"allowAnonymous": null,
|
||||||
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
|
},
|
||||||
"CreateAppointmentAsyncByInput": {
|
"CreateAppointmentAsyncByInput": {
|
||||||
"uniqueName": "CreateAppointmentAsyncByInput",
|
"uniqueName": "CreateAppointmentAsyncByInput",
|
||||||
"name": "CreateAppointmentAsync",
|
"name": "CreateAppointmentAsync",
|
||||||
@ -1022,11 +1059,48 @@
|
|||||||
"allowAnonymous": null,
|
"allowAnonymous": null,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
},
|
},
|
||||||
"UpdateAppointmentAsyncByIdAndInput": {
|
"UpdateAppointmentAsyncByInput": {
|
||||||
"uniqueName": "UpdateAppointmentAsyncByIdAndInput",
|
"uniqueName": "UpdateAppointmentAsyncByInput",
|
||||||
"name": "UpdateAppointmentAsync",
|
"name": "UpdateAppointmentAsync",
|
||||||
"httpMethod": "PUT",
|
"httpMethod": "PUT",
|
||||||
"url": "api/app/appointment/{id}/appointment",
|
"url": "api/app/appointment/appointment",
|
||||||
|
"supportedVersions": [],
|
||||||
|
"parametersOnMethod": [
|
||||||
|
{
|
||||||
|
"name": "input",
|
||||||
|
"typeAsString": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto, HospitalManagementSystem.Application.Contracts",
|
||||||
|
"type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
||||||
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
||||||
|
"isOptional": false,
|
||||||
|
"defaultValue": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"nameOnMethod": "input",
|
||||||
|
"name": "input",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
||||||
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
||||||
|
"isOptional": false,
|
||||||
|
"defaultValue": null,
|
||||||
|
"constraintTypes": null,
|
||||||
|
"bindingSourceId": "Body",
|
||||||
|
"descriptorName": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"returnValue": {
|
||||||
|
"type": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto",
|
||||||
|
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.AppointmentDto"
|
||||||
|
},
|
||||||
|
"allowAnonymous": null,
|
||||||
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
|
},
|
||||||
|
"DeleteAppointmentRecordAsyncById": {
|
||||||
|
"uniqueName": "DeleteAppointmentRecordAsyncById",
|
||||||
|
"name": "DeleteAppointmentRecordAsync",
|
||||||
|
"httpMethod": "DELETE",
|
||||||
|
"url": "api/app/appointment/{id}/appointment-record",
|
||||||
"supportedVersions": [],
|
"supportedVersions": [],
|
||||||
"parametersOnMethod": [
|
"parametersOnMethod": [
|
||||||
{
|
{
|
||||||
@ -1036,14 +1110,6 @@
|
|||||||
"typeSimple": "string",
|
"typeSimple": "string",
|
||||||
"isOptional": false,
|
"isOptional": false,
|
||||||
"defaultValue": null
|
"defaultValue": null
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "input",
|
|
||||||
"typeAsString": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto, HospitalManagementSystem.Application.Contracts",
|
|
||||||
"type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
|
||||||
"isOptional": false,
|
|
||||||
"defaultValue": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -1058,25 +1124,13 @@
|
|||||||
"constraintTypes": [],
|
"constraintTypes": [],
|
||||||
"bindingSourceId": "Path",
|
"bindingSourceId": "Path",
|
||||||
"descriptorName": ""
|
"descriptorName": ""
|
||||||
},
|
|
||||||
{
|
|
||||||
"nameOnMethod": "input",
|
|
||||||
"name": "input",
|
|
||||||
"jsonName": null,
|
|
||||||
"type": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
|
||||||
"typeSimple": "HospitalManagementSystem.Appoinments.Dto.CreateOrUpdateAppointmentDto",
|
|
||||||
"isOptional": false,
|
|
||||||
"defaultValue": null,
|
|
||||||
"constraintTypes": null,
|
|
||||||
"bindingSourceId": "Body",
|
|
||||||
"descriptorName": ""
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
"type": "HospitalManagementSystem.Patients.Dto.PatientRecordDto",
|
"type": "System.Void",
|
||||||
"typeSimple": "HospitalManagementSystem.Patients.Dto.PatientRecordDto"
|
"typeSimple": "System.Void"
|
||||||
},
|
},
|
||||||
"allowAnonymous": null,
|
"allowAnonymous": false,
|
||||||
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
"implementFrom": "HospitalManagementSystem.Appointments.AppointmentAppService"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4731,8 +4785,8 @@
|
|||||||
{
|
{
|
||||||
"name": "DOB",
|
"name": "DOB",
|
||||||
"jsonName": null,
|
"jsonName": null,
|
||||||
"type": "System.String",
|
"type": "System.DateTime?",
|
||||||
"typeSimple": "string",
|
"typeSimple": "string?",
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
"minLength": null,
|
"minLength": null,
|
||||||
"maxLength": null,
|
"maxLength": null,
|
||||||
@ -4799,6 +4853,54 @@
|
|||||||
"minimum": null,
|
"minimum": null,
|
||||||
"maximum": null,
|
"maximum": null,
|
||||||
"regex": null
|
"regex": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "InsuranceProvider",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "System.String",
|
||||||
|
"typeSimple": "string",
|
||||||
|
"isRequired": false,
|
||||||
|
"minLength": null,
|
||||||
|
"maxLength": null,
|
||||||
|
"minimum": null,
|
||||||
|
"maximum": null,
|
||||||
|
"regex": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AppointmentStatus",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
|
||||||
|
"typeSimple": "HospitalManagementSystem.GlobalEnum.appointmentStatus",
|
||||||
|
"isRequired": false,
|
||||||
|
"minLength": null,
|
||||||
|
"maxLength": null,
|
||||||
|
"minimum": null,
|
||||||
|
"maximum": null,
|
||||||
|
"regex": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VisitType",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "HospitalManagementSystem.GlobalEnum.visitType",
|
||||||
|
"typeSimple": "HospitalManagementSystem.GlobalEnum.visitType",
|
||||||
|
"isRequired": false,
|
||||||
|
"minLength": null,
|
||||||
|
"maxLength": null,
|
||||||
|
"minimum": null,
|
||||||
|
"maximum": null,
|
||||||
|
"regex": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PaymentStatus",
|
||||||
|
"jsonName": null,
|
||||||
|
"type": "HospitalManagementSystem.GlobalEnum.paymentStatus",
|
||||||
|
"typeSimple": "HospitalManagementSystem.GlobalEnum.paymentStatus",
|
||||||
|
"isRequired": false,
|
||||||
|
"minLength": null,
|
||||||
|
"maxLength": null,
|
||||||
|
"minimum": null,
|
||||||
|
"maximum": null,
|
||||||
|
"regex": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -4896,8 +4998,8 @@
|
|||||||
{
|
{
|
||||||
"name": "DOB",
|
"name": "DOB",
|
||||||
"jsonName": null,
|
"jsonName": null,
|
||||||
"type": "System.String",
|
"type": "System.DateTime?",
|
||||||
"typeSimple": "string",
|
"typeSimple": "string?",
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
"minLength": null,
|
"minLength": null,
|
||||||
"maxLength": null,
|
"maxLength": null,
|
||||||
|
@ -1,6 +1,38 @@
|
|||||||
import type { Gender } from '../../global-enum/gender.enum';
|
import type { Gender } from '../../global-enum/gender.enum';
|
||||||
import type { Status } from '../../global-enum/status.enum';
|
import type { Status } from '../../global-enum/status.enum';
|
||||||
|
|
||||||
|
export interface CreateUpdatePatientDto {
|
||||||
|
id?: string;
|
||||||
|
name?: string;
|
||||||
|
gender: Gender;
|
||||||
|
mobile?: string;
|
||||||
|
email?: string;
|
||||||
|
age: number;
|
||||||
|
treatment?: string;
|
||||||
|
doctorAssigned?: string;
|
||||||
|
address?: string;
|
||||||
|
bloodGroup?: string;
|
||||||
|
admissionDate?: string;
|
||||||
|
dischargeDate?: string;
|
||||||
|
status: Status;
|
||||||
|
imageID?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreateUpdatePatientRecordDto {
|
||||||
|
id?: string;
|
||||||
|
patientId?: string;
|
||||||
|
dateOfAdmission?: string;
|
||||||
|
labReportUrlID?: string;
|
||||||
|
medicationUrlID?: string;
|
||||||
|
medicationHistoryUrlID?: string;
|
||||||
|
nextFollowUp?: string;
|
||||||
|
diagnosis?: string;
|
||||||
|
treatmentPlan?: string;
|
||||||
|
doctorNotes?: string;
|
||||||
|
insuranceProvider?: string;
|
||||||
|
status: Status;
|
||||||
|
}
|
||||||
|
|
||||||
export interface PatientDto {
|
export interface PatientDto {
|
||||||
id?: string;
|
id?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
@ -33,35 +65,3 @@ export interface PatientRecordDto {
|
|||||||
insuranceProvider?: string;
|
insuranceProvider?: string;
|
||||||
status: Status;
|
status: Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateUpdatePatientDto {
|
|
||||||
id?: string;
|
|
||||||
name?: string;
|
|
||||||
gender: Gender;
|
|
||||||
mobile?: string;
|
|
||||||
email?: string;
|
|
||||||
age: number;
|
|
||||||
treatment?: string;
|
|
||||||
doctorAssigned?: string;
|
|
||||||
address?: string;
|
|
||||||
bloodGroup?: string;
|
|
||||||
admissionDate?: string;
|
|
||||||
dischargeDate?: string;
|
|
||||||
status: Status;
|
|
||||||
imageID?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateUpdatePatientRecordDto {
|
|
||||||
id?: string;
|
|
||||||
patientId?: string;
|
|
||||||
dateOfAdmission?: string;
|
|
||||||
labReportUrlID?: string;
|
|
||||||
medicationUrlID?: string;
|
|
||||||
medicationHistoryUrlID?: string;
|
|
||||||
nextFollowUp?: string;
|
|
||||||
diagnosis?: string;
|
|
||||||
treatmentPlan?: string;
|
|
||||||
doctorNotes?: string;
|
|
||||||
insuranceProvider?: string;
|
|
||||||
status: Status;
|
|
||||||
}
|
|
||||||
|
@ -16,11 +16,15 @@ namespace HospitalManagementSystem.Appoinments.Dto
|
|||||||
public string? Mobile { get; set; }
|
public string? Mobile { get; set; }
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
public string? DOB { get; set; }
|
public DateTime? DOB { get; set; }
|
||||||
public Guid? DoctorId { get; set; }
|
public Guid? DoctorId { get; set; }
|
||||||
public DateTime? DateOfAppointment { get; set; }
|
public DateTime? DateOfAppointment { get; set; }
|
||||||
public string? TimeOfAppointment { get; set; }
|
public string? TimeOfAppointment { get; set; }
|
||||||
public string? InjuryORContion { get; set; }
|
public string? InjuryORContion { get; set; }
|
||||||
public string? Note { get; set; }
|
public string? Note { get; set; }
|
||||||
|
public string? InsuranceProvider { get; set; }
|
||||||
|
public appointmentStatus AppointmentStatus { get; set; }
|
||||||
|
public visitType VisitType { get; set; }
|
||||||
|
public paymentStatus PaymentStatus { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ namespace HospitalManagementSystem.Appoinments.Dto
|
|||||||
public string? Mobile { get; set; }
|
public string? Mobile { get; set; }
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
public string? DOB { get; set; }
|
public DateTime? DOB { get; set; }
|
||||||
public Guid? DoctorId { get; set; }
|
public Guid? DoctorId { get; set; }
|
||||||
public DateTime? DateOfAppointment { get; set; }
|
public DateTime? DateOfAppointment { get; set; }
|
||||||
public string? TimeOfAppointment { get; set; }
|
public string? TimeOfAppointment { get; set; }
|
||||||
|
@ -18,6 +18,8 @@ using HospitalManagementSystem.Dto;
|
|||||||
using Abp.Application.Services.Dto;
|
using Abp.Application.Services.Dto;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
|
using Abp.UI;
|
||||||
|
using HospitalManagementSystem.Doctors;
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Appointments
|
namespace HospitalManagementSystem.Appointments
|
||||||
{
|
{
|
||||||
@ -26,11 +28,14 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
private readonly ICurrentUser _currentUser;
|
private readonly ICurrentUser _currentUser;
|
||||||
private readonly ICurrentTenant _currentTenant;
|
private readonly ICurrentTenant _currentTenant;
|
||||||
private IRepository<Appointment, Guid> _appointmentsRepository;
|
private IRepository<Appointment, Guid> _appointmentsRepository;
|
||||||
public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository)
|
private readonly IRepository<Doctor, Guid> _doctorRepository;
|
||||||
|
|
||||||
|
public AppointmentAppService(ICurrentUser currentUser, ICurrentTenant currentTenant, IRepository<Appointment, Guid> appointmentsRepository, IRepository<Doctor, Guid> doctorRepository)
|
||||||
{
|
{
|
||||||
_currentUser = currentUser;
|
_currentUser = currentUser;
|
||||||
_currentTenant = currentTenant;
|
_currentTenant = currentTenant;
|
||||||
_appointmentsRepository = appointmentsRepository;
|
_appointmentsRepository = appointmentsRepository;
|
||||||
|
_doctorRepository = doctorRepository;
|
||||||
}
|
}
|
||||||
public async Task<string> GetAsync()
|
public async Task<string> GetAsync()
|
||||||
{
|
{
|
||||||
@ -63,6 +68,20 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
#region Get Appointment by ID
|
||||||
|
public async Task<AppointmentDto> GetAppointmentByIdAsync(Guid id)
|
||||||
|
{
|
||||||
|
var appointment = await _appointmentsRepository.FirstOrDefaultAsync(x => x.Id == id);
|
||||||
|
|
||||||
|
if (appointment == null)
|
||||||
|
{
|
||||||
|
throw new UserFriendlyException("Appointment Details not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Create Appointment
|
#region Create Appointment
|
||||||
public async Task<AppointmentDto> CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
public async Task<AppointmentDto> CreateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
||||||
@ -76,13 +95,23 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Appointment
|
#region Update Appointment
|
||||||
public async Task<PatientRecordDto> UpdateAppointmentAsync(Guid id, CreateOrUpdateAppointmentDto input)
|
public async Task<AppointmentDto> UpdateAppointmentAsync(CreateOrUpdateAppointmentDto input)
|
||||||
{
|
{
|
||||||
var appointment = await _appointmentsRepository.GetAsync(id);
|
//var appointment = await _appointmentsRepository.GetAsync(input.Id);
|
||||||
|
Appointment appointment = new Appointment();
|
||||||
var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
var newdata = ObjectMapper.Map<CreateOrUpdateAppointmentDto, Appointment>(input);
|
||||||
|
newdata.Doctor = await _doctorRepository.GetAsync(input.DoctorId.Value);
|
||||||
appointment = newdata;
|
appointment = newdata;
|
||||||
appointment = await _appointmentsRepository.UpdateAsync(appointment);
|
appointment = await _appointmentsRepository.UpdateAsync(appointment);
|
||||||
return ObjectMapper.Map<Appointment, PatientRecordDto>(appointment);
|
return ObjectMapper.Map<Appointment, AppointmentDto>(appointment);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Delete Appointment
|
||||||
|
[Authorize(HospitalManagementSystemPermissions.Patient.Delete)]
|
||||||
|
public async Task DeleteAppointmentRecordAsync(Guid id)
|
||||||
|
{
|
||||||
|
await _appointmentsRepository.DeleteAsync(id);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
.Include(x => x.LabReportUrl)
|
.Include(x => x.LabReportUrl)
|
||||||
.Include(x => x.MedicationUrl)
|
.Include(x => x.MedicationUrl)
|
||||||
.Include(x => x.MedicationHistoryUrl)
|
.Include(x => x.MedicationHistoryUrl)
|
||||||
.WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()))
|
.WhereIf(!string.IsNullOrEmpty(input.Search), x => x.Patients.Name.ToLower().Contains(input.Search.ToLower()) || x.Patients.Email.Contains(input.Search))
|
||||||
.Where(x => x.Patients.Id == Id);
|
.Where(x => x.Patients.Id == Id);
|
||||||
|
|
||||||
var totalCount = await filteredQuery.CountAsync();
|
var totalCount = await filteredQuery.CountAsync();
|
||||||
@ -270,7 +270,7 @@ namespace HospitalManagementSystem.Patients
|
|||||||
if (!string.IsNullOrEmpty(input.Search))
|
if (!string.IsNullOrEmpty(input.Search))
|
||||||
{
|
{
|
||||||
query = _patientRepository.GetQueryableAsync().Result
|
query = _patientRepository.GetQueryableAsync().Result
|
||||||
.Where(x => x.Name.ToLower().Contains(input.Search.ToLower()))
|
.Where(x => x.Name.ToLower().Contains(input.Search.ToLower()) || x.Email.Contains(input.Search))
|
||||||
.OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
|
.OrderBy(input.Sorting ?? (nameof(Patient.Id) + " asc"))
|
||||||
.Skip(input.SkipCount)
|
.Skip(input.SkipCount)
|
||||||
.Take(input.MaxResultCount)
|
.Take(input.MaxResultCount)
|
||||||
|
@ -29,6 +29,7 @@ namespace HospitalManagementSystem.GlobalEnum
|
|||||||
NewPatient = 1,
|
NewPatient = 1,
|
||||||
Followup = 2,
|
Followup = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum paymentStatus
|
public enum paymentStatus
|
||||||
{
|
{
|
||||||
Paid = 1,
|
Paid = 1,
|
||||||
|
@ -14,8 +14,8 @@ namespace HospitalManagementSystem.Appointments
|
|||||||
public string? Mobile { get; set; }
|
public string? Mobile { get; set; }
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
public string? DOB { get; set; }
|
public DateTime? DOB { get; set; }
|
||||||
public Guid? DoctorId { get; set; }
|
//public Guid? DoctorId { get; set; }
|
||||||
[ForeignKey("DoctorId")]
|
[ForeignKey("DoctorId")]
|
||||||
public virtual Doctor? Doctor { get; set; }
|
public virtual Doctor? Doctor { get; set; }
|
||||||
public DateTime? DateOfAppointment { get; set; }
|
public DateTime? DateOfAppointment { get; set; }
|
||||||
|
@ -28,4 +28,8 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Migrations\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,131 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class addedDepartment_Doctor_Appointment_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Departments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
DepartmentNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DepartmentDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
DepartmentHead = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
||||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Departments", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Doctors",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Designation = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Education = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
||||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Doctors", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Doctors_Departments_DepartmentId",
|
|
||||||
column: x => x.DepartmentId,
|
|
||||||
principalTable: "Departments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Appointments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
DoctorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DateOfAppointment = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
TimeOfAppointment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
InjuryORContion = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Note = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
||||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Appointments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Appointments_Doctors_DoctorId",
|
|
||||||
column: x => x.DoctorId,
|
|
||||||
principalTable: "Doctors",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Appointments_DoctorId",
|
|
||||||
table: "Appointments",
|
|
||||||
column: "DoctorId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Doctors_DepartmentId",
|
|
||||||
table: "Doctors",
|
|
||||||
column: "DepartmentId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Appointments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Doctors");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Departments");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,93 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class added_patientinpatientrecord : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Patient",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Gender = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Age = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Treatment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
DoctorAssigned = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
BloodGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
DischargeDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
Status = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Patient", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PatientRecords",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
DateOfAdmission = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
Diagnosis = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
TreatmentPlan = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
DoctorNotes = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
LabReportUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
MedicationUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
MedicationHistoryUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
NextFollowUp = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Status = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PatientRecords", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PatientRecords_Patient_PatientsId",
|
|
||||||
column: x => x.PatientsId,
|
|
||||||
principalTable: "Patient",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientRecords_PatientsId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "PatientsId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Patient");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,241 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class patientdocument_entitydocument : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "LabReportUrl",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MedicationHistoryUrl",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MedicationUrl",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "LabReportUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "uniqueidentifier",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "uniqueidentifier",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "MedicationUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "uniqueidentifier",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "ImagesId",
|
|
||||||
table: "Patient",
|
|
||||||
type: "uniqueidentifier",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "EntityDocuments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
OriginalFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
GeneratedFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
FileSize = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
FilePath = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
FileType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
UploadDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_EntityDocuments", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PatientDocuments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
EntityDocumentsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PatientDocuments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PatientDocuments_EntityDocuments_EntityDocumentsId",
|
|
||||||
column: x => x.EntityDocumentsId,
|
|
||||||
principalTable: "EntityDocuments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PatientDocuments_Patient_PatientsId",
|
|
||||||
column: x => x.PatientsId,
|
|
||||||
principalTable: "Patient",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientRecords_LabReportUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "LabReportUrlId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientRecords_MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "MedicationHistoryUrlId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientRecords_MedicationUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "MedicationUrlId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Patient_ImagesId",
|
|
||||||
table: "Patient",
|
|
||||||
column: "ImagesId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientDocuments_EntityDocumentsId",
|
|
||||||
table: "PatientDocuments",
|
|
||||||
column: "EntityDocumentsId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PatientDocuments_PatientsId",
|
|
||||||
table: "PatientDocuments",
|
|
||||||
column: "PatientsId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Patient_EntityDocuments_ImagesId",
|
|
||||||
table: "Patient",
|
|
||||||
column: "ImagesId",
|
|
||||||
principalTable: "EntityDocuments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "LabReportUrlId",
|
|
||||||
principalTable: "EntityDocuments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "MedicationHistoryUrlId",
|
|
||||||
principalTable: "EntityDocuments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
|
|
||||||
table: "PatientRecords",
|
|
||||||
column: "MedicationUrlId",
|
|
||||||
principalTable: "EntityDocuments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Patient_EntityDocuments_ImagesId",
|
|
||||||
table: "Patient");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PatientDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "EntityDocuments");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PatientRecords_LabReportUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PatientRecords_MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PatientRecords_MedicationUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Patient_ImagesId",
|
|
||||||
table: "Patient");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "LabReportUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MedicationHistoryUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MedicationUrlId",
|
|
||||||
table: "PatientRecords");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ImagesId",
|
|
||||||
table: "Patient");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "LabReportUrl",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "MedicationHistoryUrl",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "MedicationUrl",
|
|
||||||
table: "PatientRecords",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
|
|||||||
namespace HospitalManagementSystem.Migrations
|
namespace HospitalManagementSystem.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(HospitalManagementSystemDbContext))]
|
[DbContext(typeof(HospitalManagementSystemDbContext))]
|
||||||
[Migration("20250131062928_patientdocument_entitydocument")]
|
[Migration("20250206061352_initial")]
|
||||||
partial class patientdocument_entitydocument
|
partial class initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -27,6 +27,229 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Address")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("AppointmentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<string>("DOB")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateOfAppointment")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DoctorId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Gender")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("InjuryORContion")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("InsuranceProvider")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Mobile")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("PaymentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("TimeOfAppointment")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("VisitType")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DoctorId");
|
||||||
|
|
||||||
|
b.ToTable("Appointments");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Departments.Department", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DepartmentDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentHead")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentNo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Status")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Departments");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Address")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<string>("DOB")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DepartmentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Designation")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Education")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Gender")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Mobile")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DepartmentId");
|
||||||
|
|
||||||
|
b.ToTable("Doctors");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
|
modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -2053,6 +2276,24 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.ToTable("AbpTenantConnectionStrings", (string)null);
|
b.ToTable("AbpTenantConnectionStrings", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Doctors.Doctor", "Doctor")
|
||||||
|
.WithMany("Appointments")
|
||||||
|
.HasForeignKey("DoctorId");
|
||||||
|
|
||||||
|
b.Navigation("Doctor");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Departments.Department", "Department")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("DepartmentId");
|
||||||
|
|
||||||
|
b.Navigation("Department");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
|
||||||
@ -2252,6 +2493,11 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Appointments");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Actions");
|
b.Navigation("Actions");
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
namespace HospitalManagementSystem.Migrations
|
namespace HospitalManagementSystem.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Initial : Migration
|
public partial class initial : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -412,6 +412,54 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
table.PrimaryKey("PK_AbpUsers", x => x.Id);
|
table.PrimaryKey("PK_AbpUsers", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Departments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
DepartmentNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DepartmentDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
DepartmentHead = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Departments", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "EntityDocuments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
OriginalFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
GeneratedFileName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
FileSize = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
FilePath = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
FileType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
UploadDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_EntityDocuments", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "OpenIddictApplications",
|
name: "OpenIddictApplications",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
@ -707,6 +755,75 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Doctors",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Gender = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Designation = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Education = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Doctors", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Doctors_Departments_DepartmentId",
|
||||||
|
column: x => x.DepartmentId,
|
||||||
|
principalTable: "Departments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Patient",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Gender = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Age = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Treatment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DoctorAssigned = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
BloodGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DischargeDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Status = table.Column<int>(type: "int", nullable: false),
|
||||||
|
ImagesId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Patient", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Patient_EntityDocuments_ImagesId",
|
||||||
|
column: x => x.ImagesId,
|
||||||
|
principalTable: "EntityDocuments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "OpenIddictAuthorizations",
|
name: "OpenIddictAuthorizations",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
@ -755,6 +872,126 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Appointments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Gender = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DOB = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
DoctorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DateOfAppointment = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
TimeOfAppointment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
InjuryORContion = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Note = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
AppointmentStatus = table.Column<int>(type: "int", nullable: false),
|
||||||
|
VisitType = table.Column<int>(type: "int", nullable: false),
|
||||||
|
PaymentStatus = table.Column<int>(type: "int", nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Appointments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Appointments_Doctors_DoctorId",
|
||||||
|
column: x => x.DoctorId,
|
||||||
|
principalTable: "Doctors",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PatientDocuments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
EntityDocumentsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TagName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PatientDocuments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientDocuments_EntityDocuments_EntityDocumentsId",
|
||||||
|
column: x => x.EntityDocumentsId,
|
||||||
|
principalTable: "EntityDocuments",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientDocuments_Patient_PatientsId",
|
||||||
|
column: x => x.PatientsId,
|
||||||
|
principalTable: "Patient",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PatientRecords",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
PatientsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
DateOfAdmission = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
Diagnosis = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
TreatmentPlan = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DoctorNotes = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
LabReportUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MedicationUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MedicationHistoryUrlId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
NextFollowUp = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
InsuranceProvider = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Status = table.Column<int>(type: "int", nullable: false),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PatientRecords", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientRecords_EntityDocuments_LabReportUrlId",
|
||||||
|
column: x => x.LabReportUrlId,
|
||||||
|
principalTable: "EntityDocuments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientRecords_EntityDocuments_MedicationHistoryUrlId",
|
||||||
|
column: x => x.MedicationHistoryUrlId,
|
||||||
|
principalTable: "EntityDocuments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientRecords_EntityDocuments_MedicationUrlId",
|
||||||
|
column: x => x.MedicationUrlId,
|
||||||
|
principalTable: "EntityDocuments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientRecords_Patient_PatientsId",
|
||||||
|
column: x => x.PatientsId,
|
||||||
|
principalTable: "Patient",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "OpenIddictTokens",
|
name: "OpenIddictTokens",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
@ -1007,6 +1244,16 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
table: "AbpUsers",
|
table: "AbpUsers",
|
||||||
column: "UserName");
|
column: "UserName");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Appointments_DoctorId",
|
||||||
|
table: "Appointments",
|
||||||
|
column: "DoctorId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Doctors_DepartmentId",
|
||||||
|
table: "Doctors",
|
||||||
|
column: "DepartmentId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_OpenIddictApplications_ClientId",
|
name: "IX_OpenIddictApplications_ClientId",
|
||||||
table: "OpenIddictApplications",
|
table: "OpenIddictApplications",
|
||||||
@ -1036,6 +1283,41 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
name: "IX_OpenIddictTokens_ReferenceId",
|
name: "IX_OpenIddictTokens_ReferenceId",
|
||||||
table: "OpenIddictTokens",
|
table: "OpenIddictTokens",
|
||||||
column: "ReferenceId");
|
column: "ReferenceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Patient_ImagesId",
|
||||||
|
table: "Patient",
|
||||||
|
column: "ImagesId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientDocuments_EntityDocumentsId",
|
||||||
|
table: "PatientDocuments",
|
||||||
|
column: "EntityDocumentsId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientDocuments_PatientsId",
|
||||||
|
table: "PatientDocuments",
|
||||||
|
column: "PatientsId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientRecords_LabReportUrlId",
|
||||||
|
table: "PatientRecords",
|
||||||
|
column: "LabReportUrlId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientRecords_MedicationHistoryUrlId",
|
||||||
|
table: "PatientRecords",
|
||||||
|
column: "MedicationHistoryUrlId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientRecords_MedicationUrlId",
|
||||||
|
table: "PatientRecords",
|
||||||
|
column: "MedicationUrlId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientRecords_PatientsId",
|
||||||
|
table: "PatientRecords",
|
||||||
|
column: "PatientsId");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@ -1113,12 +1395,21 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpUserTokens");
|
name: "AbpUserTokens");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Appointments");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "OpenIddictScopes");
|
name: "OpenIddictScopes");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "OpenIddictTokens");
|
name: "OpenIddictTokens");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PatientDocuments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PatientRecords");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpEntityChanges");
|
name: "AbpEntityChanges");
|
||||||
|
|
||||||
@ -1134,14 +1425,26 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpUsers");
|
name: "AbpUsers");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Doctors");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "OpenIddictAuthorizations");
|
name: "OpenIddictAuthorizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Patient");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpAuditLogs");
|
name: "AbpAuditLogs");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Departments");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "OpenIddictApplications");
|
name: "OpenIddictApplications");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "EntityDocuments");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
|
|||||||
namespace HospitalManagementSystem.Migrations
|
namespace HospitalManagementSystem.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(HospitalManagementSystemDbContext))]
|
[DbContext(typeof(HospitalManagementSystemDbContext))]
|
||||||
[Migration("20250115133021_addedDepartment_Doctor_Appointment_Table")]
|
[Migration("20250206080641_dobdatetime")]
|
||||||
partial class addedDepartment_Doctor_Appointment_Table
|
partial class dobdatetime
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -22,7 +22,7 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
|
||||||
.HasAnnotation("ProductVersion", "9.0.0")
|
.HasAnnotation("ProductVersion", "9.0.1")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
@ -35,6 +35,9 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.Property<string>("Address")
|
b.Property<string>("Address")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("AppointmentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("CreationTime");
|
.HasColumnName("CreationTime");
|
||||||
@ -43,8 +46,8 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
.HasColumnType("uniqueidentifier")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasColumnName("CreatorId");
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
b.Property<string>("DOB")
|
b.Property<DateTime?>("DOB")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateOfAppointment")
|
b.Property<DateTime?>("DateOfAppointment")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
@ -66,12 +69,15 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.Property<string>("FirstName")
|
b.Property<string>("FirstName")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Gender")
|
b.Property<int>("Gender")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("InjuryORContion")
|
b.Property<string>("InjuryORContion")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("InsuranceProvider")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
@ -95,9 +101,15 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("PaymentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("TimeOfAppointment")
|
b.Property<string>("TimeOfAppointment")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("VisitType")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("DoctorId");
|
b.HasIndex("DoctorId");
|
||||||
@ -238,6 +250,292 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.ToTable("Doctors");
|
b.ToTable("Doctors");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(40)
|
||||||
|
.HasColumnType("nvarchar(40)")
|
||||||
|
.HasColumnName("ConcurrencyStamp");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraProperties")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)")
|
||||||
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
|
b.Property<string>("FilePath")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FileSize")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FileType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("GeneratedFileName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("OriginalFileName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TagName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("UploadDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("EntityDocuments", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(40)
|
||||||
|
.HasColumnType("nvarchar(40)")
|
||||||
|
.HasColumnName("ConcurrencyStamp");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid>("EntityDocumentsId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraProperties")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)")
|
||||||
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<Guid>("PatientsId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("TagName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("EntityDocumentsId");
|
||||||
|
|
||||||
|
b.HasIndex("PatientsId");
|
||||||
|
|
||||||
|
b.ToTable("PatientDocuments", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Patients.Patient", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Address")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("AdmissionDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<int>("Age")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("BloodGroup")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(40)
|
||||||
|
.HasColumnType("nvarchar(40)")
|
||||||
|
.HasColumnName("ConcurrencyStamp");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DischargeDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("DoctorAssigned")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraProperties")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)")
|
||||||
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
|
b.Property<int>("Gender")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ImagesId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Mobile")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Treatment")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ImagesId");
|
||||||
|
|
||||||
|
b.ToTable("Patient", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Patients.PatientRecord", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(40)
|
||||||
|
.HasColumnType("nvarchar(40)")
|
||||||
|
.HasColumnName("ConcurrencyStamp");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateOfAdmission")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Diagnosis")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DoctorNotes")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ExtraProperties")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)")
|
||||||
|
.HasColumnName("ExtraProperties");
|
||||||
|
|
||||||
|
b.Property<string>("InsuranceProvider")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LabReportUrlId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MedicationHistoryUrlId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MedicationUrlId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("NextFollowUp")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("PatientsId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("TreatmentPlan")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("LabReportUrlId");
|
||||||
|
|
||||||
|
b.HasIndex("MedicationHistoryUrlId");
|
||||||
|
|
||||||
|
b.HasIndex("MedicationUrlId");
|
||||||
|
|
||||||
|
b.HasIndex("PatientsId");
|
||||||
|
|
||||||
|
b.ToTable("PatientRecords", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -1996,6 +2294,63 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.Navigation("Department");
|
b.Navigation("Department");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EntityDocumentsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("HospitalManagementSystem.Patients.Patient", "Patients")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PatientsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("EntityDocuments");
|
||||||
|
|
||||||
|
b.Navigation("Patients");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Patients.Patient", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "Images")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ImagesId");
|
||||||
|
|
||||||
|
b.Navigation("Images");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Patients.PatientRecord", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "LabReportUrl")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("LabReportUrlId");
|
||||||
|
|
||||||
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "MedicationHistoryUrl")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("MedicationHistoryUrlId");
|
||||||
|
|
||||||
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "MedicationUrl")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("MedicationUrlId");
|
||||||
|
|
||||||
|
b.HasOne("HospitalManagementSystem.Patients.Patient", "Patients")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PatientsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("LabReportUrl");
|
||||||
|
|
||||||
|
b.Navigation("MedicationHistoryUrl");
|
||||||
|
|
||||||
|
b.Navigation("MedicationUrl");
|
||||||
|
|
||||||
|
b.Navigation("Patients");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
|
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
|
@ -1,19 +1,20 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace HospitalManagementSystem.Migrations
|
namespace HospitalManagementSystem.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class changeGenderEnumToString : Migration
|
public partial class dobdatetime : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AlterColumn<int>(
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
name: "Gender",
|
name: "DOB",
|
||||||
table: "Appointments",
|
table: "Appointments",
|
||||||
type: "int",
|
type: "datetime2",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
oldClrType: typeof(string),
|
oldClrType: typeof(string),
|
||||||
oldType: "nvarchar(max)",
|
oldType: "nvarchar(max)",
|
||||||
@ -24,12 +25,12 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AlterColumn<string>(
|
migrationBuilder.AlterColumn<string>(
|
||||||
name: "Gender",
|
name: "DOB",
|
||||||
table: "Appointments",
|
table: "Appointments",
|
||||||
type: "nvarchar(max)",
|
type: "nvarchar(max)",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
oldClrType: typeof(int),
|
oldClrType: typeof(DateTime),
|
||||||
oldType: "int",
|
oldType: "datetime2",
|
||||||
oldNullable: true);
|
oldNullable: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,6 +24,229 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Address")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("AppointmentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DOB")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateOfAppointment")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DoctorId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Gender")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("InjuryORContion")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("InsuranceProvider")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Mobile")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("PaymentStatus")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("TimeOfAppointment")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("VisitType")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DoctorId");
|
||||||
|
|
||||||
|
b.ToTable("Appointments");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Departments.Department", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DepartmentDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentHead")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("DepartmentNo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Status")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Departments");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Address")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<string>("DOB")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DepartmentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Designation")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Education")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Gender")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Mobile")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DepartmentId");
|
||||||
|
|
||||||
|
b.ToTable("Doctors");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
|
modelBuilder.Entity("HospitalManagementSystem.Documents.EntityDocument", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -2050,6 +2273,24 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
b.ToTable("AbpTenantConnectionStrings", (string)null);
|
b.ToTable("AbpTenantConnectionStrings", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Appointments.Appointment", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Doctors.Doctor", "Doctor")
|
||||||
|
.WithMany("Appointments")
|
||||||
|
.HasForeignKey("DoctorId");
|
||||||
|
|
||||||
|
b.Navigation("Doctor");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("HospitalManagementSystem.Departments.Department", "Department")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("DepartmentId");
|
||||||
|
|
||||||
|
b.Navigation("Department");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
modelBuilder.Entity("HospitalManagementSystem.Documents.PatientDocument", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
|
b.HasOne("HospitalManagementSystem.Documents.EntityDocument", "EntityDocuments")
|
||||||
@ -2249,6 +2490,11 @@ namespace HospitalManagementSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("HospitalManagementSystem.Doctors.Doctor", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Appointments");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Actions");
|
b.Navigation("Actions");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user