Commit 923445b1 authored by Sandeep Sagar Panjala's avatar Sandeep Sagar Panjala

ts config changes

parent 0e23a8b4
{
"workbench.colorCustomizations": {
"activityBar.background": "#25128A",
"titleBar.activeBackground": "#341AC1",
"titleBar.activeForeground": "#FBFAFE"
"activityBar.background": "#2A1D76",
"titleBar.activeBackground": "#3A28A5",
"titleBar.activeForeground": "#FBFBFE"
}
}
\ No newline at end of file
......@@ -95,5 +95,12 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Update="Properties\launchSettings.json">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="https://json.schemastore.org/babelrc.json" /></VisualStudio></ProjectExtensions>
</Project>
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
......@@ -16,19 +12,23 @@
],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@angular-eslint/component-class-suffix": "off"
"@angular-eslint/component-class-suffix": "off",
"@typescript-eslint/ban-types": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"prefer-const": "off",
"no-var": "off"
}
},
{
"files": [
"*.html"
],
"files": ["*.html"],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {
"@angular-eslint/template/label-has-associated-control": "off"
"@angular-eslint/template/label-has-associated-control": "off",
"@angular-eslint/template/elements-content": "off"
}
}
]
......
{
"workbench.colorCustomizations": {
"activityBar.background": "#213304",
"titleBar.activeBackground": "#2F4705",
"titleBar.activeForeground": "#F5FDE9"
}
}
\ No newline at end of file
......@@ -42,7 +42,8 @@
"ngx-toastr": "17.0.2",
"rxjs": "7.8.1",
"simplebar": "6.2.5",
"zone.js": "0.13.0"
"zone.js": "0.13.0",
"ngx-print": "1.3.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.5",
......
......@@ -44,6 +44,10 @@ const routes: Routes = [
path: "masters",
loadChildren: () => import('./areas/admin/masters/masters.module').then(m => m.MastersModule)
},
{
path: "admissions",
loadChildren: () => import('./areas/admin/admissions/admissions.module').then(m => m.AdmissionsModule)
},
]
},
{ path: "**", redirectTo: "not-found" },
......
<router-outlet></router-outlet>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { SharedModule } from '@src/app/shared/shared.module';
import { AdmissionsParentPage } from './admissions.page';
import { AdmissionsViewPage } from './pages/view/view.page';
import { TransferRequestPage } from './pages/transfer-request/transfer-request.page';
import { AdmissionsRoutingModule } from './admissions.routing.module';
import { ReactiveFormsModule } from '@angular/forms';
@NgModule({
declarations: [
AdmissionsParentPage,
AdmissionsViewPage,
TransferRequestPage
],
imports: [
AdmissionsRoutingModule,
ReactiveFormsModule,
SharedModule
]
})
export class AdmissionsModule { }
\ No newline at end of file
import { Component, ViewEncapsulation } from "@angular/core";
@Component({
templateUrl: "./admissions.html",
encapsulation: ViewEncapsulation.None
})
export class AdmissionsParentPage {
}
\ No newline at end of file
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from '@src/app/shared/guards';
import { AdmissionsParentPage } from './admissions.page';
import { AdmissionsViewPage } from './pages/view/view.page';
import { TransferRequestPage } from './pages/transfer-request/transfer-request.page';
// ADMISSIONS
const routes: Routes = [
{
path: "",
data: { title: "Admissions" },
canActivate: [AuthGuard],
canActivateChild: [AuthGuard],
component: AdmissionsParentPage,
children: [
{ path: "", redirectTo: "view", pathMatch: "full" },
{ path: "view", component: AdmissionsViewPage, data: { title: "Admissions", } },
{ path: "view/:pid", component: AdmissionsViewPage, data: { title: "Admissions", } },
{ path: "view/:pid/:isOpToIp", component: AdmissionsViewPage, data: { title: "Admissions", } },
{ path: "transfer-request", component: TransferRequestPage, data: { title: "Transfer Request", } },
{ path: "**", redirectTo: "view" }
]
}
]
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AdmissionsRoutingModule { }
\ No newline at end of file
export * from "./admissions.page";
export * from "./pages/view/view.page";
export * from "./pages/transfer-request/transfer-request.page";
\ No newline at end of file
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="page-title-box">
<!--<div class="page-title-right">
<button type="button" class="btn btn-sm btn-primary" (click)="onOpenModel(templateForTransferRequest)"><i class="mdi mdi-plus mr-1"></i>Raise Transfer Request</button>
</div>-->
<h4 class="page-title">Transfer Request</h4>
</div>
</div>
</div>
<div class="col-12 p-0">
<div class="card-box p-0">
<div class="row p-2" *ngIf="loading">
<div class="col-12">
<div class="d-flex align-items-center">
<span
class="spinner-grow text-warning"
role="status"
aria-hidden="true"
></span>
<span class="ml-2">Please wait while loading ...</span>
</div>
</div>
</div>
<div class="row p-2" *ngIf="!loading && (!records || !records.length)">
<div class="col-12 mh-400">
<div class="no-data">
<img src="assets/images/no-data.png" alt="No data" />
<p class="sub-title">There is no data to show you right now.</p>
<!--<button type="button" class="btn btn-primary btn-sm" (click)="onOpenModel(templateForTransferRequest)"><i class="fe-plus mr-1"></i> Raise Transfer Request</button>-->
</div>
</div>
</div>
<div
class="table-responsive"
*ngIf="!loading && records && records.length > 0"
>
<table
class="table table-centered table-sm table-striped table-borderless mb-0"
>
<thead class="table-info">
<tr>
<th>Patient Name</th>
<th>Type</th>
<th>Doctor Unit Name/Charge Categories</th>
<th>Created By</th>
<th>Approved By</th>
<th>Rejected By</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of records;index as i;">
<td [textContent]="item.fullName || '---'"></td>
<td [textContent]="item.changeRequestType || '---'"></td>
<td>
<span
*ngIf="item.unitName"
[textContent]="item.unitName"
></span>
<span
*ngIf="item.chargeCategoryName"
[textContent]="item.chargeCategoryName"
></span>
</td>
<td>
<div class="media-body">
<h5
class="mb-0 mt-0 font-weight-normal"
[textContent]="item.createdByName"
></h5>
<small
class="tx-13"
[textContent]="item.createdDate | date:'dd-MM-yyyy, hh:mm a'"
></small>
</div>
</td>
<!--<td [textContent]="item.createdByName || '---'"></td>-->
<td>
<div class="media-body">
<h5
class="mb-0 mt-0 font-weight-normal"
[textContent]="item.approvedByName"
></h5>
<small
class="tx-13"
[textContent]="item.approvedDate | date:'dd-MM-yyyy, hh:mm a'"
></small>
</div>
</td>
<td>
<div class="media-body">
<h5
class="mb-0 mt-0 font-weight-normal"
[textContent]="item.rejectedByName"
></h5>
<small
class="tx-13"
[textContent]="item.rejectedDate | date:'dd-MM-yyyy, hh:mm a'"
></small>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-start">
<!--<a href="javascript:;" placement="left" ngbTooltip="Reject" ><i class="mdi mdi-close"></i></a>-->
<a
*ngIf="item.active"
href="javascript:;"
(click)="onReject(item)"
placement="left"
ngbTooltip="Reject"
><i class="mdi mdi-close text-danger mdi-18px"></i
></a>
<a
*ngIf="item.active"
href="javascript:;"
(click)="onAcceptRequest(item)"
placement="left"
ngbTooltip="Accept"
><i class="mdi mdi-check mdi-18px"></i
></a>
<a
*ngIf="!item.active && item.approvedByName"
href="javascript:;"
placement="left"
><span class="badge badge-success">Accepted</span></a
>
<a
*ngIf="!item.active && !item.approvedByName"
href="javascript:;"
placement="left"
><span class="badge badge-danger">Rejected</span></a
>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<nav
class="d-flex align-items-center justify-content-between p-2"
*ngIf="pagination.totalPages > 1"
>
<p class="mb-0 font-13">
<span class="text-dark"
>Page <span [textContent]="pagination.currentPage"></span> of
<span [textContent]="pagination.totalPages"></span
></span>
<span class="ml-1">
<span
>(Showing
<span
[textContent]="pagination.currentItems - records.length + 1"
></span>
- <span [textContent]="pagination.currentItems"></span> of
<span [textContent]="pagination.totalItems"></span> Records
)</span
>
</span>
</p>
<!-- <ngb-pagination class="pagination justify-content-end" [maxSize]="5" [rotate]="false" [ellipses]="false" [(page)]="pagination.pageIndex" [pageSize]="pagination.pageSize" (pageChange)="onNextPage()" [collectionSize]="pagination.totalItems">
<ng-template ngbPaginationPrevious><i class="fe-arrow-left"></i></ng-template>
<ng-template ngbPaginationNext><i class="fe-arrow-right"></i></ng-template>
</ngb-pagination> -->
</nav>
</div>
</div>
</div>
</div>
<ng-template #templateForTransferRequest>
<form [formGroup]="transferRequestForm" (ngSubmit)="onSubmit()">
<div class="modal-header">
<h4 class="modal-title">Raise Transfer Request</h4>
<button
type="button"
class="close"
data-dismiss="modal"
aria-hidden="true"
(click)="onCloseModal();"
>
×
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-4">
<div class="form-group">
<label class="mb-0">Patient Search <code>*</code></label>
<ng-select
[items]="patients"
[loading]="searching"
[clearable]="true"
bindLabel="name"
bindValue="id"
placeholder="Enter Patient Name/mobile/Umr"
(search)="fetchPatient($event)"
formControlName="admissionId"
[ngClass]="{ 'is-invalid': submitted && form.admissionId.errors }"
>
<ng-template ng-notfound-tmp let-searchTerm="searchTerm">
<div
class="ng-option disabled"
*ngIf="searchTerm && searchTerm.length >= 2"
>
No patient found for '{{searchTerm}}'
</div>
<div
class="ng-option disabled"
*ngIf="(!searchTerm || searchTerm.length < 2)"
>
Search patient
</div>
</ng-template>
<ng-template ng-option-tmp let-item="item" let-i="index">
<div class="media">
<div class="avatar-xs mr-2">
<!-- <avatar-img
*ngIf="item.optionalText"
[src]="item.optionalText"
[alt]="item.name"
cssClass="img-fluid rounded-circle"
></avatar-img> -->
<span
*ngIf="!item.optionalText"
class="avatar-title rounded-circle font-10 bg-soft-warning font-weight-bold text-warning"
[textContent]="item.name | initials"
></span>
</div>
<div class="media-body">
<h5
class="mb-0 mt-0 font-weight-normal"
[textContent]="item.name"
></h5>
<span
class="d-block font-13"
[textContent]="item.optionalText1 +' / '+ item.optionalText2 || '-----'"
></span>
</div>
</div>
</ng-template>
</ng-select>
</div>
</div>
<div class="col-4">
<div class="form-group">
<div class="row">
<div class="col-md-5 mb-1">
<div class="custom-control custom-switch mb-0">
<input
type="checkbox"
id="bed"
name="bed"
(change)="onChangeBed()"
/>
<label for="bed" [textContent]="'Bed Request'"></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-1">
<div class="custom-control custom-switch mb-0">
<input
type="checkbox"
id="generalItem"
name="doctor"
(change)="onChangeDoctorRequest()"
/>
<label
for="generalItem"
[textContent]="'Doctor Request'"
></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" *ngIf="isBed">
<div class="form-group">
<label class="mb-1">Charge Category</label>
<ng-select
class="ng-select-sm text-uppercase"
[items]="chargeCategories"
bindLabel="name"
bindValue="id"
autocomplete="nope"
placeholder="Select charge categories"
formControlName="chargeCategoryId"
>
<ng-template ng-notfound-tmp let-searchTerm="searchTerm">
<div class="ng-option disabled">
No charge Categories found for '{{searchTerm}}' Z
</div>
</ng-template>
</ng-select>
</div>
</div>
<div class="row" *ngIf="isDoctorRequest">
<div class="form-group">
<label class="mb-1">Doctor Units</label>
<ng-select
class="ng-select-sm"
[items]="DoctorUnits"
[loading]="loadingDoctorUnits"
bindLabel="unitName"
bindValue="doctorUnitMasterId"
typeToSearchText="Search doctorUnits"
placeholder="Enter Doctor Unit Name"
formControlName="doctorUnitMasterId"
>
<ng-template ng-notfound-tmp let-searchTerm="searchTerm">
No Doctor Units found<span *ngIf="searchTerm">
for '{{searchTerm}}'</span
>.
</ng-template>
<ng-template ng-option-tmp let-item="item" let-i="index">
<h5
class="mb-1 mt-0 font-weight-normal"
[textContent]="item.unitName"
></h5>
</ng-template>
<ng-template ng-label-tmp let-item="item" let-i="index">
<div class="media">
<div class="avatar-xs mr-1">
<span
class="avatar-title rounded-circle font-11 font-weight-bold bg-soft-warning text-primary"
><i class="fe-map-pin"></i
></span>
</div>
<div class="media-body">
<h5
class="mb-0 mt-0 font-weight-normal"
[textContent]="item.unitName"
></h5>
</div>
</div>
</ng-template>
</ng-select>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="submit"
class="btn btn-sm btn-primary mr-1"
[disabled]="submitting"
>
<span *ngIf="submitting">
<span
class="spinner-border spinner-border-sm mr-1"
role="status"
aria-hidden="true"
></span>
Please wait..
</span>
<span *ngIf="!submitting"
><i class="mdi mdi-content-save mr-1"></i>Submit</span
>
</button>
</div>
</form>
</ng-template>
<ng-template #chargeCategoryChangeTemplate>
<div class="modal-header">
<h4 class="modal-title">Bed Request</h4>
<button
type="button"
class="close"
data-dismiss="modal"
aria-hidden="true"
(click)="onCloseModal();"
>
×
</button>
</div>
<div class="modal-body">
<div>
<button
tabindex="0"
type="button"
*ngFor="let item of filterChargeCategory; let i = index;"
class="slot btn btn-primary"
(click)="onSelectChargeCategory(item)"
>
<i [class]="'icon-' + 'clock-1'"></i>
<span [textContent]="item.name"></span>
</button>
</div>
<div *ngIf="!showBeds">
<span style="font-weight: bold">
<span class="align-items-center"
>Please select the charge type to see available beds..</span
>
</span>
</div>
<div *ngIf="showBeds">
<div class="row" *ngIf="loadingBeds">
<div class="col-md-12">
<span class="align-items-center"
>Please wait while loading beds..</span
>
</div>
</div>
<div class="row" *ngIf="!loadingBeds && beds.length <=0">
<div class="col-md-12">
<span style="font-weight: bold">
<span class="align-items-center">There are no beds to select.</span>
</span>
</div>
</div>
<div class="row" *ngIf="!loadingBeds">
<div class="mb-1" *ngFor="let item of beds">
<button
type="button"
class="btn mr-1"
[ngClass]="{'btn-soft-pink': item.gender !== 'M' && item.bedStatusName !== 'Available', 'btn-soft-blue': item.gender === 'M' && item.bedStatusName !=='Available', 'btn-success' : selectedBedManagement.bedId === item.bedId , 'btn-light' : selectedBedManagement.bedId !== item.bedId}"
[ngStyle]="{'background-color': (selectedBedManagement.bedId === item.bedId) ? 'btn-success':'btn-light'}"
(click)="selectBed(item);"
style="box-shadow: 5px 5px 37px #c3c3c3"
>
{{item.bedNumber}}<br />
<span
class="text-white"
*ngIf="selectedBedManagement.bedId === item.bedId"
style="font-size: 16px"
><i class="fe-check"></i
></span>
<span class="text-primary mr-1" style="font-size: 11px"
>Room Rent: <b>₹ {{item.roomRent}}</b></span
>
<span
class="text-primary"
*ngIf="selectedBedManagement.bedId !== item.bedId"
[ngClass]="(item.bedStatusName === 'Available')?'text-success':'text-danger'"
style="font-size: 11px"
>
<b>{{item.bedStatusName}}</b>
</span>
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="submit"
class="btn btn-sm btn-primary mr-1"
[disabled]="submitting"
(click)="onSubmit()"
>
<span *ngIf="submitting">
<span
class="spinner-border spinner-border-sm mr-1"
role="status"
aria-hidden="true"
></span>
Please wait..
</span>
<span *ngIf="!submitting"
><i class="mdi mdi-content-save mr-1"></i>Submit</span
>
</button>
</div>
</ng-template>
import { OnInit, OnDestroy, Component, TemplateRef, ViewChild } from "@angular/core";
import { NgbModal, NgbModalRef } from "@ng-bootstrap/ng-bootstrap";
import { Page, IUserAccount, IResource, Pagination } from "../../../../../shared/models";
import { takeUntil, finalize } from "rxjs/operators";
import { AppData } from "../../../../../app.data";
import { UtilHelper, ApiResources } from "../../../../../shared/helpers";
import { ResourceService, HttpService, NotifyService } from "../../../../../shared/services";
import { DoctorUnits, BedManagement } from "../../../../../shared/entities";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import { AdmissionTransferRequest } from "../../../../../shared/entities/admission-transfer-request.entity";
import { HttpErrorResponse } from "@angular/common/http";
@Component({
templateUrl: "./transfer-request.html",
})
export class TransferRequestPage implements OnInit, OnDestroy {
page: Page;
modalRef: NgbModalRef;
isBed = false;
isDoctorRequest = false;
locationId: number;
searching: boolean;
patients: Array<IResource>;
chargeCategories: Array<IResource>;
DoctorUnits: Array<DoctorUnits>;
loadingDoctorUnits: boolean;
transferRequestForm: FormGroup;
submitting: boolean;
submitted: boolean;
loading: boolean;
records: Array<AdmissionTransferRequest>;
@ViewChild("chargeCategoryChangeTemplate", { static: true }) chargeCategoryChangeTemplate: TemplateRef<any>;
chargeCategory: Array<IResource>;
filterChargeCategory: Array<IResource>;
chargeCategoryId: number;
loadingBeds: boolean;
showBeds: boolean;
beds: Array<BedManagement>;
selectedBed: BedManagement;
selectedBedManagement: BedManagement;
selectedRequest: AdmissionTransferRequest;
pagination: Pagination;
constructor(
private readonly modalService: NgbModal,
private readonly appData: AppData,
private readonly resourceService: ResourceService,
private readonly httpService: HttpService,
private readonly formBuilder: FormBuilder,
private readonly notifyService: NotifyService,
) {
this.page = new Page();
this.filterChargeCategory = new Array<IResource>();
this.initPagination();
}
private initPagination() {
this.pagination = new Pagination();
this.pagination.pageIndex = 1;
this.pagination.pageSize = 10;
}
onNextPage() {
$("body,html").animate({ scrollTop: 0 });
this.fetchrequests();
}
buildForm() {
this.transferRequestForm = this.formBuilder.group({
admissionTransferRequestId: [null],
admissionId: [null, Validators.required],
chargeCategoryId: [null],
doctorUnitMasterId: [null],
})
}
fetchPatient(value: any) {
if (UtilHelper.isEmpty(value.term)) {
const request = value.term;
if (request.length > 2) {
this.searching = true;
this.resourceService.admissionPatient(request.trim())
.pipe(finalize(() => { this.searching = false }))
.pipe(takeUntil(this.page.unSubscribe))
.subscribe((response: Array<IResource>) => {
this.patients = response;
});
}
}
else {
this.patients = [];
}
}
//private fetchChargeCategories() {
// this.resourceService.chargeCategory()
// .pipe(takeUntil(this.page.unSubscribe))
// .subscribe((response: Array<IResource>) => {
// this.chargeCategories = response;
// });
//}
//private fetchDoctorUnits(locationId: number) {
// this.loadingDoctorUnits = true;
// const request = {
// locationId: locationId
// };
// this.httpService.post(ApiResources.getURI(ApiResources.doctorUnit.base, ApiResources.doctorUnit.fetch), request)
// .pipe(takeUntil(this.page.unSubscribe))
// .pipe(finalize(() => this.loadingDoctorUnits = false))
// .subscribe((response: Array<DoctorUnits>) => {
// this.DoctorUnits = response;
// });
//}
onChangeBed() {
this.isBed = !this.isBed;
}
onChangeDoctorRequest() {
this.isDoctorRequest = !this.isDoctorRequest;
}
ngOnDestroy(): void {
this.onCloseModal();
this.page.unsubscribeAll()
}
ngOnInit(): void {
this.appData.userAccount
.pipe(takeUntil(this.page.unSubscribe))
.subscribe((userAccount: IUserAccount) => {
if (userAccount) {
this.page.userAccount = userAccount;
this.locationId = this.page.userAccount.locationId;
this.fetchrequests();
} else {
this.page.userAccount = undefined;
}
});
}
private fetchChargeCategory(records?: AdmissionTransferRequest) {
this.resourceService.chargeCategory()
.pipe(takeUntil(this.page.unSubscribe))
.subscribe((response: Array<IResource>) => {
this.chargeCategory = response;
this.filterChargeCategory = [];
records.charges = records.chargeCategories.split(',');
const count = records.charges.length;
for (let i = 0; i < count; i++) {
var id = parseInt(records.charges[i]);
const filter = this.chargeCategory.find(s => s.id == id);
this.filterChargeCategory.push(filter);
}
});
}
onOpenModel(content: TemplateRef<any>, records?: AdmissionTransferRequest) {
this.fetchChargeCategory(records);
this.modalRef = this.modalService.open(content, {
backdrop: "static",
keyboard: false,
centered: false,
size: "xl",
windowClass: "custom-modal effect-scale"
});
}
onCloseModal() {
try {
this.modalRef.close();
this.modalRef = undefined;
} catch (e) {
// ignored;
console.log(e);
}
}
onSubmit() {
if (this.selectedBedManagement != null && this.selectedBedManagement != undefined) {
this.notifyService.confirm(`Are you sure you want to accept this request`, () => {
this.submitting = true;
const request = {
bedId: this.selectedBedManagement.bedId,
admissionId: this.selectedRequest.admissionId,
approvedBy: this.page.userAccount.accountId,
admissionTransferRequestId: this.selectedRequest.admissionTransferRequestId,
doctorUnitMasterId:0,
locationId: this.page.userAccount.locationId
};
this.httpService
.post(ApiResources.getURI(ApiResources.admissions.base, ApiResources.admissions.acceptAdmissionTransferRequest), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => { }))
.subscribe(
(response: number) => {
if (response > 0) {
this.submitting = false;
this.notifyService.success("Request Accepted Successfully.");
this.fetchrequests();
this.onCloseModal();
}
}, (error: HttpErrorResponse) => {
const errorMessage = UtilHelper.handleError(error);
if (errorMessage) {
this.notifyService.warning(errorMessage);
} else {
this.notifyService.defaultError();
}
}
);
})
} else {
this.notifyService.warningToast("Please Select Bed ");
}
}
get form() { return this.transferRequestForm.controls; }
private fetchrequests() {
this.loading = true;
const request = {
...this.pagination
};
this.httpService.post(ApiResources.getURI(ApiResources.admissions.base, ApiResources.admissions.fetchTransferRequest), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => this.loading = false))
.subscribe(
(response: Array<AdmissionTransferRequest>) => {
if (response.length > 0) {
this.records = response;
UtilHelper.applyPagination(this.records, this.pagination);
}
},
);
}
onAcceptRequest(item: AdmissionTransferRequest) {
this.showBeds = false;
this.selectedRequest = item
if (item.admissionChangeRequestTypeId == 1) {
this.onOpenModel(this.chargeCategoryChangeTemplate, item);
}
else {
this.notifyService.confirm(`Are you sure you want to accept this request`, () => {
const request = {
admissionId: item.admissionId,
doctorUnitMasterId: item.doctorUnitMasterId,
approvedBy: this.page.userAccount.accountId,
admissionTransferRequestId: item.admissionTransferRequestId
};
this.httpService
.post(ApiResources.getURI(ApiResources.admissions.base, ApiResources.admissions.acceptAdmissionTransferRequest), request)
.pipe(takeUntil(this.page.unSubscribe))
.subscribe(
(response: number) => {
if (response > 0) {
this.notifyService.success("Request Accepted Successfully.");
this.fetchrequests();
}
}, (error: HttpErrorResponse) => {
const errorMessage = UtilHelper.handleError(error);
if (errorMessage) {
this.notifyService.warning(errorMessage);
} else {
this.notifyService.defaultError();
}
}
);
})
}
}
onReject(item: AdmissionTransferRequest) {
this.notifyService.confirm(`Are you sure you want to Reject this request`, () => {
const request = {
admissionId: item.admissionId,
admissionTransferRequestId: item.admissionTransferRequestId,
rejectedBy: this.page.userAccount.accountId,
};
this.httpService
.post(ApiResources.getURI(ApiResources.admissions.base, ApiResources.admissions.rejectAdmissionTransferRequest), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => { }))
.subscribe(
() => {
this.notifyService.successToast("Rejected Successfully.");
this.fetchrequests();
}, (error: HttpErrorResponse) => {
const errorMessage = UtilHelper.handleError(error);
if (errorMessage) {
this.notifyService.warning(errorMessage);
} else {
this.notifyService.defaultError();
}
}
);
})
}
onSelectChargeCategory(record: IResource) {
this.chargeCategoryId = record.id;
if (this.chargeCategoryId != 0 || this.chargeCategoryId != undefined || this.chargeCategoryId == null) {
this.fetchBeds();
}
}
fetchBeds(callback?: Function) {
this.showBeds = true;
this.loadingBeds = true;
const request = {
chargeCategoryId: this.chargeCategoryId,
bedStatusId: 1
};
this.httpService
.post<Array<BedManagement>>(ApiResources.getURI(ApiResources.admissions.base, ApiResources.admissions.fetchBeds), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => this.loadingBeds = false))
.subscribe(
(response: Array<BedManagement>) => {
this.beds = response;
const availableBed = this.beds.find(x => x.bedStatusName === 'Available');
if (availableBed) {
this.selectBed(availableBed);
}
callback && callback();
},
() => {
this.beds = [];
}
);
}
selectBed(bed: BedManagement) {
this.selectedBed = bed;
this.selectedBedManagement = bed;
this.selectedBedManagement.wardId = bed.wardId;
this.selectedBedManagement.wardName = bed.wardName;
this.selectedBedManagement.roomId = bed.roomId;
this.selectedBedManagement.roomName = bed.roomName;
this.selectedBedManagement.roomRent = bed.roomRent;
//this.bookAdmissionForm.patchValue({
// bedId: bed.bedId
//});
}
}
\ No newline at end of file
export interface ICounsellingDetails {
counsellingId: number;
counsellingNo: string;
packageModuleId: number;
chargeCategoryId: number;
patientId: number;
payTypeId: number;
insuranceCompanyId: number;
tpaId: number;
patientOrganization: string;
}
\ No newline at end of file
.mt-10 {
margin-top: 9rem;
}
.report-banner {
display: flex;
align-items: center;
justify-content: center;
}
.banner-in {
display: flex;
align-items: center;
justify-content: center;
padding: 2px;
border-top: none;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
.no-background {
background-color: #f4f5f8;
}
.table-white {
background-color: #FFF !important;
}
.alert-warning {
background-color: #f9e6b2 !important;
border-color: #f1d17a !important;
}
.border-top-none {
border-top: none !important;
}
.report-banner .alert {
margin-bottom: 10px;
padding: 2px 10px;
font-size: smaller;
}
.btn-soft-blue {
background-color: dodgerblue !important;
}
.btn-soft-pink {
background-color: lightpink !important;
}
.column-direction {
flex-direction: column;
}
.blink {
font-size: 14px;
font-weight: bold;
position: relative;
color: red;
animation: example 2s infinite;
}
@keyframes example {
0% {
color: red;
}
25% {
color: orange;
}
50% {
color: orangered;
}
75% {
color: orange;
}
100% {
color: red;
}
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.w-20-px {
width: 20px;
}
.w-100-per {
width: 100%;
}
.disabled {
pointer-events: none;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,11 +3,13 @@ import { MastersPage } from './masters.page';
import { CubiclePage } from './pages/cubicle/cubicle.page';
import { SharedModule } from '@src/app/shared/shared.module';
import { MastersRoutingModule } from './masters.routing.module';
import { AppointmentTypePage } from './pages/appointment-types/appointment-types.page';
@NgModule({
declarations: [
MastersPage,
CubiclePage
CubiclePage,
AppointmentTypePage
],
imports: [
MastersRoutingModule,
......
......@@ -3,6 +3,7 @@ import { Routes, RouterModule } from '@angular/router';
import { CubiclePage } from './pages/cubicle/cubicle.page';
import { MastersPage } from './masters.page';
import { AuthGuard } from '@src/app/shared/guards';
import { AppointmentTypePage } from './pages/appointment-types/appointment-types.page';
const routes: Routes = [
{
......@@ -14,6 +15,7 @@ const routes: Routes = [
children: [
{ path: "", redirectTo: "cubicle", pathMatch: "full" },
{ path: "cubicle", component: CubiclePage, data: { title: "cubicle" } },
{ path: "appointment-types", component: AppointmentTypePage, data: { title: "Appointment Types" } },
{ path: "**", redirectTo: "cubicle" },
]
}
......
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ng-container *menuButton="'TPLYFd'">
<button type="button" class="btn btn-primary btn-sm" (click)="onOpenModel(appointmentTypeTemplate)"><i class="fe-plus mr-1"></i> Add </button>
</ng-container>
</div>
<h4 class="page-title">Appointment Types</h4>
</div>
</div>
<div class="col-12">
<div class="card-box p-0">
<div class="row p-2" *ngIf="loading">
<div class="col-12">
<div class="d-flex align-items-center">
<span class="spinner-grow text-warning" role="status" aria-hidden="true"></span>
<span class="ml-2">Please wait while loading ...</span>
</div>
</div>
</div>
<div class="row p-2" *ngIf="!loading && (!records || !records.length)">
<div class="col-12 mh-400">
<div class="no-data">
<img src="assets/images/no-data.png" alt="No data" />
<p class="sub-title">There is no data to show you right now.</p>
<button type="button" class="btn btn-primary btn-sm" (click)="onOpenModel(appointmentTypeTemplate)"><i class="fe-plus mr-1"></i> Add </button>
</div>
</div>
</div>
<div class="table-responsive" *ngIf="!loading && records.length > 0">
<table class="table table-sm">
<thead class="table-info">
<tr>
<th>Appointment Type</th>
<th>CreatedBy</th>
<th>Created Date</th>
<th>Modified By</th>
<th>Modified Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of records;index as i;" [ngStyle]="{'background-color': item.rowColor ? item.rowColor:'#ffff'}">
<td>
<span [textContent]="item.name"></span>
</td>
<td>
<h5 class="font-13 mb-0" [textContent]="item.createdByName"></h5>
</td>
<td>
<span [textContent]="item.createdDate | date:'dd-MM-yyyy, hh:mm a'"></span>
</td>
<td>
<div *ngIf="item.modifiedBy">
<h5 class="font-13 mb-0" [textContent]="item.modifiedByName"></h5>
</div>
<span *ngIf="!item.modifiedBy">-----</span>
</td>
<td>
<span *ngIf="item.modifiedDate" [textContent]="item.modifiedDate | date:'dd-MM-yyyy, hh:mm a'"></span>
<span *ngIf="!item.modifiedDate">----</span>
</td>
<td>
<div class="d-flex align-items-center">
<a href="javascript:;" class="action-icon text-primary mr-1" placement="left" ngbTooltip="Edit" (click)="onOpenModel(appointmentTypeTemplate, item)"><i class="fe-edit"></i></a>
<a href="javascript:;" class="action-icon text-danger" placement="left" ngbTooltip="Delete" (click)="onDelete(item)"><i class="fe-trash-2"></i></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<ng-template #appointmentTypeTemplate>
<form [formGroup]="appointmentTypeForm" (ngSubmit)="onSubmit()">
<div class="modal-header">
<h4 class="modal-title"><i class="mdi mdi-human-edit mr-1"></i> Appointment Type</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="onCloseModal();">×</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<div class="form-group">
<label class="mb-1">Appointment Type <code>*</code></label>
<input type="text" class="form-control" minlength="1" placeholder="Enter Appointment Type ." formControlName="name"
[ngClass]="{ 'is-invalid': submitted && form.name.errors }" />
<div class="text-danger" *ngIf="submitted && form.name.errors">
<p *ngIf="form.name.errors.required">Appointment Type is required.</p>
<p *ngIf="form.name.errors.maxlength">Only 250 characters are allowed.</p>
<p *ngIf="form.name.errors.whiteSpace">Please remove white space...</p>
</div>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="mb-1">Assign Color </label>
<input type="color" class="form-control" placeholder="Pick a color" formControlName="rowColor" />
</div>
<ul class="color-grid">
<li *ngFor="let color of colorPalates" class="color-option"
[ngClass]="{'is-selected': appointmentTypeForm.value.rowColor === color.colorPalate}"
(click)="selectColorOption(color.colorPalate)" [ngStyle]="{'background':color.colorPalate}">
</li>
</ul><br />
<div class="alert alert-info">
<i class="mdi mdi-information mr-1"></i> Picking a color will help to distinguish the row in other pages.
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light btn-sm mr-1" (click)="onCloseModal();">Cancel</button>
<button type="submit" [disabled]="submitting" class="btn btn-primary btn-sm">
<span *ngIf="submitting">
<span class="spinner-border spinner-border-sm mr-1" role="status" aria-hidden="true"></span>
Please wait..
</span>
<span *ngIf="!submitting">Submit</span>
</button>
</div>
</form>
</ng-template>
\ No newline at end of file
import { OnInit, OnDestroy, Component, ViewEncapsulation, TemplateRef } from "@angular/core";
import { takeUntil, finalize } from "rxjs/operators";
import { IUserAccount, Page } from "../../../../../shared/models";
import { AppData } from "../../../../../app.data";
import { NgbModalRef, NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { AppointmentTypes } from "../../../../../shared/entities/appoinment-types.entity";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import { ApiResources } from "../../../../../shared/helpers";
import { HttpService, NotifyService } from "../../../../../shared/services";
import { WhiteSpaceValidator } from "../../../../../shared/validators";
class ColorTemplate {
colorPalate: string;
}
@Component({
templateUrl: "./appointment-types.html",
encapsulation: ViewEncapsulation.None
})
export class AppointmentTypePage implements OnInit, OnDestroy {
page: Page;
modalRef: NgbModalRef;
submitting: boolean;
submitted: boolean;
colorPalates: Array<ColorTemplate>;
loading: boolean;
appointmentTypeForm: FormGroup;
records: Array<AppointmentTypes>;
constructor(
private readonly appData: AppData,
private readonly formBuilder: FormBuilder,
private readonly httpService: HttpService,
private readonly modalService: NgbModal,
private readonly notifyService: NotifyService )
{
this.page = new Page();
this.colorPalates = new Array<ColorTemplate>();
this.records = new Array<AppointmentTypes>();
}
fetchAppointmentTypes() {
this.loading = true;
const request = {};
this.httpService.post(ApiResources.getURI(ApiResources.appointmentTypes.base, ApiResources.appointmentTypes.fetch), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => this.loading = false))
.subscribe(
(response: Array<AppointmentTypes>) => {
this.records = response;
},
);
}
onSubmit() {
this.submitted = true;
if (this.appointmentTypeForm.invalid) {
return;
}
this.submitting = true;
const request = {
...this.appointmentTypeForm.getRawValue(),
createdBy: this.page.userAccount.accountId,
createdByName: this.page.userAccount.fullName,
};
let url = ApiResources.getURI(ApiResources.appointmentTypes.base, ApiResources.appointmentTypes.insert);
if (request["appointmentTypeId"] > 0) {
url = ApiResources.getURI(ApiResources.appointmentTypes.base, ApiResources.appointmentTypes.update);
}
this.httpService.post(url, request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => this.submitted = this.submitting = false))
.subscribe(
(response: number) => {
if (response > 0) {
this.notifyService.successToast(`Record ${request["appointmentTypeId"] > 0 ? 'updated' : 'added'} successfully.`);
}
if (response === -1) {
this.notifyService.warningToast("This Appointment Type already exists.");
return;
}
this.onCloseModal();
this.fetchAppointmentTypes();
},
);
}
onDelete(record: AppointmentTypes) {
this.notifyService.delete(() => {
const request = {
appointmentTypeId: record.appointmentTypeId,
name: record.name,
createdBy: this.page.userAccount.accountId,
createdByName: this.page.userAccount.fullName,
};
this.httpService.post(ApiResources.getURI(ApiResources.appointmentTypes.base, ApiResources.appointmentTypes.delete), request)
.pipe(takeUntil(this.page.unSubscribe))
.pipe(finalize(() => this.loading = false))
.subscribe(
(response: number) => {
if (response > 0) {
this.notifyService.successToast("Record deleted successfully.");
}
if (response === -3) {
this.notifyService.warningToast("The record you tried to delete can't be deleted because it is being used.");
}
this.fetchAppointmentTypes();
},
);
})
}
private buildColorPalates() {
["#ffd2d2", "#d9d4ff", "#d2e5ff", "#f3f7f9", "#F8E5B4", "#d4ffef", "#daffff", "#ffdbff", "#CFFFC2", "#E4E6E8"].forEach((color) => {
const paltaes = new ColorTemplate();
paltaes.colorPalate = color;
this.colorPalates.push(paltaes)
});
}
private buildForm() {
this.buildColorPalates();
this.appointmentTypeForm = this.formBuilder.group({
appointmentTypeId: 0,
name: [null, [Validators.required, Validators.maxLength(250), WhiteSpaceValidator.isValid]],
rowColor: ["#FFFFFF"]
});
}
onOpenModel(content: TemplateRef<any>, record?: AppointmentTypes) {
this.buildForm();
if (record) {
this.appointmentTypeForm.patchValue({
appointmentTypeId: record.appointmentTypeId,
name: record.name,
rowColor: record.rowColor
});
}
this.modalRef = this.modalService.open(content, {
backdrop: "static",
keyboard: false,
centered: false,
windowClass: "custom-modal effect-scale"
});
}
get form() { return this.appointmentTypeForm.controls; }
onCloseModal() {
try {
this.modalRef.close();
this.modalRef = undefined;
} catch (e) {
// ignored;
}
this.loading = false;
this.submitting = undefined;
this.submitted = undefined;
this.colorPalates = new Array<ColorTemplate>();
}
selectColorOption(color: string) {
this.appointmentTypeForm.patchValue({
rowColor: color
});
}
ngOnDestroy() {
this.onCloseModal();
this.page.unsubscribeAll()
}
ngOnInit() {
this.appData.userAccount
.pipe(takeUntil(this.page.unSubscribe))
.subscribe((userAccount: IUserAccount) => {
if (userAccount) {
this.page.userAccount = userAccount;
this.fetchAppointmentTypes();
} else {
this.page.userAccount = undefined;
}
});
}
}
\ No newline at end of file
......@@ -4,9 +4,11 @@
chargeCategoryName: string;
unitName: string;
createdByName: string;
rejectedByName: string;
modifiedByName: string;
modifiedDate: Date;
createdDate: Date;
rejectedDate: Date;
doctorUnitMasterId: number;
admissionId: number;
active: boolean;
......
......@@ -106,6 +106,11 @@
lunch: object;
dinner: object;
unitName: string;
isOnline: boolean;
isConvertedFromOPtoIp: boolean;
departmentName: string;
dischargeStatus: any;
internalMedicineId: any;
}
class MedicationContentViewModel {
......
......@@ -175,6 +175,37 @@ export class ApiResources {
insert: "insert"
};
static readonly callhistorydata = {
base: "callhistorydata",
add: "add",
fetch: "fetch",
insert: "insert",
update: "update",
delete: "delete",
fetchcallhistoryId: "fetchcallhistoryId"
};
static readonly feedbackDetails = {
base: "feedbackdetails",
add: "add",
fetch: "fetch",
insert: "insert",
update: "update",
delete: "delete",
fetchfeedbackId: "fetchfeedbackId"
};
static readonly contactdetails = {
base: "contactdetails",
add: "add",
fetchbyId: "fetchbyId",
fetch: "fetch",
insert: "insert",
update: "update",
delete: "delete",
};
static readonly exceptionLog = {
base: "exception-log",
fetch: "fetch",
......@@ -371,6 +402,8 @@ export class ApiResources {
labDepartment: "lab-department",
labMaster: "lab-master",
labVacutainer: "lab-vacutainer",
labExternalAgencies: "lab-external-agencies",
labActiveExternalAgencies: "lab-external-agencies-active",
scanMachines: "scan-machine-availability",
fetchScanMachineTest: "fetch-scan-machine-test",
scanClassification: "fetch-scan-classification",
......@@ -396,6 +429,7 @@ export class ApiResources {
searchPatientByFilter: "appointment-patient-filter",
providerAvailability: "provider-availability",//
receiptAreaTypeId: "receipt-area",
receiptAreaTypeIds: "receipt-area-id",
partsOfDay: "parts-of-day",
howDidYouKnow: "how-did-you-know",
education: "education",
......@@ -479,8 +513,13 @@ export class ApiResources {
lWareHouses: "location-warehouses",
retailStoreWare: "warehouse-retail",
encounterTemplates: "fetch-template-header",
modulesMaster:"fetch-modules-master"
modulesMaster: "fetch-modules-master",
fetchAllLabs: "fetch-all-labs",
providersLocation: "providers-location",
providersBasedOnSpecialization: "specialization-provider",
locationChargeTemplate:"location-charge-template",
dietConditions: "diet-conditions",
patientsWithUmrAndMobile:"patients-WithUmr-AndMobile",
};
static readonly pharmacyIndent = {
......@@ -642,7 +681,15 @@ export class ApiResources {
medicationCountReport: "medication-count-report",
labDetailReport: "lab-detail-report",
expiryStockReport: "expiry-stock-report",
billDiscount: "bill-discount"
billDiscount: "bill-discount",
fetchReminders: "fetch-reminders",
billDailyReport: "bill-daily-report",
deptWiseAdmissionCount: "dept-wise-admission-count",
fetchRetailIssueReport:"retail-indent-report",
avgStayWardWiseReport: "avg-stay-ward-wise-report",
callCenterReport: "call-center-report",
labRevenueReport:"lab-revenue-report",
CallCenterAppointments:"call-center-appointment"
};
static readonly providers = {
......@@ -696,6 +743,7 @@ export class ApiResources {
fetchSlotsForMultipleDates: "fetch-slots-for-multipledays",
fetchAvailabilityVisitTypes: "fetch-visit-types",
fetchdurationbasedonvisitType: "fetch-duration-basedon-visitType",
fetchSessionSlots: "fetch-session-slots"
};
static readonly appointments = {
......@@ -735,7 +783,8 @@ export class ApiResources {
fetchView: "fetch-view",
cancelAll: "cancel-all",
rescheduleAll: "reschedule-all",
sendSms: "sendSms"
sendSms: "sendSms",
getAppointmentCount:"get-appointments-count",
};
static readonly admissions = {
......@@ -856,7 +905,8 @@ export class ApiResources {
addOpiion: "add-opinion",
fetchANCCard: "fetch-anc-card",
fetchFullTrascript: "fetch-list-fulltrascript",
fetchLabParameters: "fetch-lab-parameters"
fetchLabParameters: "fetch-lab-parameters",
findEncounterData: "find-encounter"
};
......@@ -1689,7 +1739,8 @@ export class ApiResources {
findVisitNo: "find-visitNo",
InsertCommonEncounter: "add-common-encounter",
fetchCommonEncounter: "fetch-common-encounter",
nurseNotesReport: "nurse-note-report"
nurseNotesReport: "nurse-note-report",
encounterComplete : "encouter-completed"
};
static readonly employeeShifts = {
......@@ -1907,7 +1958,10 @@ export class ApiResources {
addOrderMaster: "add-order-master",
updateOrderMaster: "update-order-master",
fetchOrderMaster: "fetch-order-master",
deleteOrderMaster: "delete-order-master"
deleteOrderMaster: "delete-order-master",
modifyencounterOrderTemplates: "modify-encounterOrderTemplates",
fetchencounterOrderTemplates:"fetch-encounterOrderTemplates",
changestatusencounterOrderTemplates:"change-status-encounterOrderTemplates"
}
static readonly labs = {
......@@ -1971,13 +2025,19 @@ export class ApiResources {
modifyLabVacutainerStatus: "modify-lab-vacutainer-status",
multipleReportsVerification: "multi-labreport-verification",
fetchExternalLabAgency: "fetch-external-lab-agency",
fetchExternalLabAgencyDetail: "fetch-external-lab-agency-detail",
modifyExternalLabAgencyStatus: "modify-external-lab-agency-status",
modifyExternalLabAgencyDetailStatus: "modify-external-lab-agency-detail-status",
modifyExternalLabAgency: "modify-external-lab-agency",
modifyExternalLabAgencyDetail: "modify-external-lab-agency-detail",
fetchlabsChargeofChargeCategory: "fetch-lab-chargecategory-charge",
fetchSampleCollectedTests: "fetch-sample-collected-tests",
unCollectSamples: "uncollect-samples",
fetchAllSampleTypes: "fetchAllSampleTypes",
fetchAllDepartmentTypes: "fetchAllDepartmentTypes",
getAllSampleunCollectReasons: "get-all-sample-uncollect-reasons",
getAllSampleRejectReasons: "get-all-sample-reject-reasons",
checkExternalAgencyExists: "check-external-agency-exists",
}
......@@ -2015,7 +2075,9 @@ export class ApiResources {
fetchForSampleCollection: "fetch-lab-for-sample-collection",
collectSample: "collect-sample",
transferSamples: "transfer-samples",
transferSamplesExternal: "transfer-samples-external",
fetchTransferedSample: "fetch-transfered-samples",
fetchExternalTransferedSample: "fetch-transfered-samples-external",
fetchToReceiveSample: "fetch-samples-to-receive",
onReceiveSample: "on-sample-receive",
fetchReceivedLabs: "fetch-received-labs",
......@@ -2186,6 +2248,17 @@ export class ApiResources {
findVisitNo: "find-visitNo",
fetchPatientMeasurementHistory: "fetch-patient-measurement-history"
};
static readonly neonatalEncounter = {
base: "neonatal-encounter",
find: "find",
findDashboard: "find-dashboard",
findPrescription: "find-prescription",
modify: "modify",
findFullTranscript: "find-full-transcript",
};
static readonly workingHour = {
base: "working-hour",
fetch: "fetch-all",
......@@ -2397,7 +2470,8 @@ export class ApiResources {
fetchPendingInventoryRequests: "fetch-pending-inventory-request",
updateInventoryProductRequest: "update-product-for-pending-inventory-request",
approveInventoryRequest: "approve-inventory-request",
changeVendorAtFinalPO: "change-vendor-at-po"
changeVendorAtFinalPO: "change-vendor-at-po",
fetchAddedPurchaseByGrn: "fetch-added-purchase-by-grn"
};
static readonly encounterTemplate = {
......@@ -2458,7 +2532,8 @@ export class ApiResources {
//findPrescription: "find-prescription",
modify: "modify",
findVisitNo: "visit-no",
findFullTrascript: "find-prescription"
findFullTrascript: "find-prescription",
findgpla: "find-gpla"
};
......@@ -2589,22 +2664,62 @@ export class ApiResources {
acceptQuotation: "accept-quotation"
};
static readonly geneticSpecialityEncounter = {
base: "genetic-speciality-encounter",
find: "find",
findDashboard: "find-dashboard",
modify: "modify",
}
static readonly whatsAppTickets = {
base: "whatsapp-tickets",
fetch: "get-alltickets",
changeStatus: "ChangeStatus"
}
static readonly register = {
base: "register",
modify:"modify"
}
static readonly physiotherapyEncounter =
{
base: "physiotherapy-encounter",
add: "add",
fetch: "fetch",
update:"update"
}
static readonly insuranceTemplate = {
base: "insurance-templates",
add: "add",
fetch: "fetch",
update: "update",
delete: "delete",
fetchInsuranceTemplate: "fetch-insurance-template",
changestatus: "change-status"
};
static readonly encountersLog = {
base: "encounterslog",
fetch: "fetch",
insert:"insert"
}
static getURI(base: string, endPoint: string): string {
const apiEndPoint = `${base}/${endPoint}`;
const localSettings = localStorage.getItem("settings");
const localSettingsFromSession = sessionStorage.getItem("settingsUrls");
let localSettings = localStorage.getItem("settings");
let localSettingsFromSession = sessionStorage.getItem("settingsUrls");
if (localSettings) {
const setting = JSON.parse(localSettings);
let setting = JSON.parse(localSettings);
return setting["baseURI"] + apiEndPoint;
}
else if (localSettingsFromSession) {
const setting = JSON.parse(localSettingsFromSession);
let setting = JSON.parse(localSettingsFromSession);
return setting["baseURI"] + apiEndPoint;
} else {
if (AppConfig.settings) {
return AppConfig.settings.baseURI + apiEndPoint;
} else {
const origin = location.origin;
let origin = location.origin;
let baseURI = "";
if (origin.includes("localhost")) {
baseURI = "http://localhost:62545/api/";
......
......@@ -50,3 +50,4 @@ export * from "./user-account.model";
export * from "./user.model";
export * from "./video-call-history.model";
export * from "./vitals.model";
export * from "./look-up.model";
export class LookUpModel {
id: number;
name: string;
value: any;
followUpDays: any;
followUpDaysLimit: any;
visitTypeId: number;
visitorName: string;
}
\ No newline at end of file
......@@ -268,6 +268,11 @@ export class ResourceService {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchPatient), true);
}
patientsWithUmrAndMobile(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientsWithUmrAndMobile), true, { searchParam: searchParam });
}
pharmacyCategories() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyCategories), true);
}
......@@ -514,6 +519,14 @@ export class ResourceService {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labVacutainer));
}
labExternalAgencies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labExternalAgencies));
}
labActiveExternalAgencies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labActiveExternalAgencies));
}
scanMachine() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanMachines))
}
......@@ -598,6 +611,10 @@ export class ResourceService {
receiptAreaTypeId() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.receiptAreaTypeId));
}
receiptAreaTypeIds() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.receiptAreaTypeIds));
}
activeStatus() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.activeStatus));
}
......@@ -868,4 +885,23 @@ export class ResourceService {
modulesMaster() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.modulesMaster));
}
providersLocation(departmentId?: number, locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providersLocation), true, { departmentId: departmentId, locationId: locationId });
}
allLabs() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAllLabs), true);
}
providerBasedOnSpecialization(specializatonId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providersBasedOnSpecialization), true, { specializationId: specializatonId });
}
locationChargeTemplate(admissionPayTypeId?: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationChargeTemplate), { admissionPayTypeId: admissionPayTypeId});
}
dietConditions() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.dietConditions), true);
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import { LoadingBarRouterModule } from "@ngx-loading-bar/router";
import { DateParserFormatter, NgbUTCStringAdapter } from "@shared/formatters";
import { MomentModule } from "ngx-moment";
import { ToastrModule } from "ngx-toastr";
import { NgxPrintModule } from "ngx-print";
@NgModule({
imports: [
......@@ -24,6 +25,7 @@ import { ToastrModule } from "ngx-toastr";
NgSelectModule,
NgIdleModule.forRoot(),
MomentModule.forRoot(),
NgxPrintModule,
ToastrModule.forRoot({
timeOut: 2000,
positionClass: "toast-bottom-right",
......@@ -51,7 +53,8 @@ import { ToastrModule } from "ngx-toastr";
NgIdleModule,
MomentModule,
ToastrModule,
DragDropModule
DragDropModule,
NgxPrintModule
]
})
export class SharedCommonModule {
......
......@@ -23,44 +23,24 @@
"useDefineForClassFields": false,
"allowSyntheticDefaultImports": true,
"noPropertyAccessFromIndexSignature": false,
"lib": [
"ES2022",
"dom"
],
"lib": ["ES2022", "dom"],
"paths": {
"@src/*": [
"src/*"
],
"@app/*": [
"src/app/*"
],
"@environments/*": [
"src/environments/*"
],
"@account/*": [
"src/app/areas/account/*"
],
"@admin/*": [
"src/app/areas/admin/*"
],
"@support/*": [
"src/app/areas/support/*"
],
"@error/*": [
"src/app/areas/error/*"
],
"@shared/*": [
"src/app/shared/*"
],
"@accountant/*": [
"src/app/areas/accountant/*"
]
"@src/*": ["src/*"],
"@app/*": ["src/app/*"],
"@environments/*": ["src/environments/*"],
"@account/*": ["src/app/areas/account/*"],
"@admin/*": ["src/app/areas/admin/*"],
"@support/*": ["src/app/areas/support/*"],
"@error/*": ["src/app/areas/error/*"],
"@shared/*": ["src/app/shared/*"],
"@accountant/*": ["src/app/areas/accountant/*"]
}
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
"strictTemplates": false,
"fullTemplateTypeCheck": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment