Commit 71a17529 authored by Sandeep Sagar Panjala's avatar Sandeep Sagar Panjala

initial commit

parent 476e4126
import { Pipe, PipeTransform } from "@angular/core";
import * as moment from "moment";
@Pipe({
name: "age"
})
export class AgePipe implements PipeTransform {
//transform(value: Date): string {
// let today = moment();
// let birthdate = moment(value);
// let years = today.diff(birthdate, 'years');
// let html: string = years + " yr ";
// html += today.subtract(years, 'years').diff(birthdate, 'months') + " mo";
// return html; // only yr ,m
//}
transform(value: Date | string, precision: "years" | "months" | "days" = "years") {
if (!value) {
return "";
}
const today = moment();
const birthdate = moment(value);
let age = '';
switch (precision) {
case "days":
age += today.diff(birthdate, 'years') + 'Y '; //years
const y = today.diff(birthdate, 'years'); //yr
age += today.subtract(y, 'years').diff(birthdate, 'months') + 'M '; // months
var m = today.diff(birthdate, 'months'); //m
birthdate.add(m, 'months');
age += today.diff(birthdate, 'days') + 'D'; //days
break;
case "months":
age += today.diff(birthdate, 'years') + 'Y '; //years
const yr = today.diff(birthdate, 'years'); //yr
age += today.subtract(yr, 'years').diff(birthdate, 'months') + 'M'; // months
break;
default:
age += today.diff(birthdate, 'years') + 'Y '; //years
break;
}
return age;
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
function formatBytes(a: number, b: number) { if (0 === a) return "0 Bytes"; const c = 0 > b ? 0 : b, d = Math.floor(Math.log(a) / Math.log(1024)); return parseFloat((a / Math.pow(1024, d)).toFixed(c)) + " " + ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][d] }
@Pipe({
name: "formatBytes"
})
export class FormatBytesPipe implements PipeTransform {
transform(size: number, length = 2) {
if (!size) {
return "";
}
return formatBytes(size, length);
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "fromArray"
})
export class FromArrayPipe implements PipeTransform {
transform(value: Array<string>) {
if (!value && !value.length) {
return "";
}
return value.join(", ");
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "gender"
})
export class GenderPipe implements PipeTransform {
transform(val: string) {
switch (val) {
case "M":
return "Male";
case "F":
return "Female";
case "O":
return "Other";
case "A":
return "Ambiguous";
default:
return "N/A";
}
}
}
\ No newline at end of file
export * from "./safe.pipe";
export * from "./initials.pipe";
export * from "./utc-to-local.pipe";
export * from "./format-bytes.pipe";
export * from "./gender.pipe";
export * from "./marital-status.pipe";
export * from "./from-array.pipe";
export * from "./to-array.pipe";
export * from "./minute-seconds.pipe";
export * from "./search.pipe";
export * from "./sort-form-array.pipe";
export * from "./sort-form.pipe";
export * from "./age.pipe";
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "initials"
})
export class InitialsPipe implements PipeTransform {
transform(value: any) {
if (!value) {
return "";
}
if (value.indexOf(" ") > 0) {
const titles = value.split(" ");
return titles[0].substring(0, 1).toUpperCase() + titles[titles.length - 1].substring(0, 1).toUpperCase();
} else {
return value.substring(0, 2).toUpperCase();
}
}
}
@Pipe({
name: "spaceTitle"
})
export class TitlePipe implements PipeTransform {
transform(value: any) {
if (!value) {
return "";
}
return value.replace(/([A-Z])/g, " $1").replace("Mi Qlave", "MiQlave").trim();
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "maritalStatus"
})
export class MaritalStatusPipe implements PipeTransform {
transform(val: string) {
switch (val) {
case "M":
return "Married";
case "S":
return "Single";
case "D":
return "Divorced";
case "W":
return "Widowed";
case "O":
return "Other";
default:
return "N/A";
}
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "minuteSeconds"
})
export class MinuteSecondsPipe implements PipeTransform {
transform(value: number): string {
if (!value) {
return "";
}
const minutes = Math.floor(value / 60);
return minutes.toString().padStart(2, "0") + ":" + (value - minutes * 60).toString().padStart(2, "0");
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser";
@Pipe({
name: "safe"
})
export class SafePipe implements PipeTransform {
constructor(private readonly sanitizer: DomSanitizer) { }
transform(url: string) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "search"
})
export class SearchPipe implements PipeTransform {
transform(value, keys: string, term: string) {
if (!term) {
return value;
}
return (value || []).filter(item => keys.split(",").some(key => item.hasOwnProperty(key) && new RegExp(term, "gi").test(item[key])));
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "sortFormArray",
pure: false
})
export class SortFormArrayPipe implements PipeTransform {
transform(array: Array<string>, property: string): Array<string> {
if (array !== undefined) {
return array.sort((a: any, b: any) => {
const aValue = a[property];
const bValue = b[property];
if (aValue < bValue) {
return -1;
} else if (aValue > bValue) {
return 1;
} else {
return 0;
}
});
}
return array;
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "sortForm",
pure: false
})
export class SortFormPipe implements PipeTransform {
transform(array: Array<any>, property: string): Array<string> {
if (array !== undefined) {
return array.sort((a: any, b: any) => {
const aValue = a.value[property];
const bValue = b.value[property];
if (aValue < bValue) {
return -1;
} else if (aValue > bValue) {
return 1;
} else {
return 0;
}
});
}
return array;
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "toArray"
})
export class ToArrayPipe implements PipeTransform {
transform(value: any) {
if (!value) {
return [];
}
if (value.indexOf(",") < 0) {
return [value];
}
return value.split(",");
}
}
\ No newline at end of file
import { Pipe, PipeTransform } from "@angular/core";
import * as moment from "moment";
@Pipe({
name: "utcToLocal"
})
export class UTCToLocalPipe implements PipeTransform {
transform(date: string | Date, isTimestamp?: boolean, format?: string) {
if (!date) {
return "";
}
isTimestamp = isTimestamp === null || isTimestamp === undefined ? true : isTimestamp;
const dateFormat = isTimestamp ? "MM/DD/YYYY hh:mm a" : "MM/DD/YYYY";
const utcTime = date;
const offset = moment().utcOffset();
return moment.utc(utcTime).utcOffset(offset).format(format ? format : dateFormat);
}
}
\ No newline at end of file
import { Injectable } from "@angular/core";
import { BehaviorSubject, Observable, Subject } from "rxjs";
import { HealthCard } from "../entities";
@Injectable()
export class AppointmentRefreshService {
private jitsiSource = new BehaviorSubject(null);
jitsiAccount: Observable<any> = this.jitsiSource.asObservable();
refresh(isRefreshed: boolean) {
this.jitsiSource.next(isRefreshed);
}
private source = new BehaviorSubject(null);
appointment: Observable<any> = this.source.asObservable();
refreshAppointment(isRefreshed: boolean) {
this.source.next(isRefreshed);
}
private conditionalRefreshSource = new BehaviorSubject(null);
conditionalRefresh: Observable<any> = this.conditionalRefreshSource.asObservable();
conditionalRefreshAppointment(model: {}) {
this.conditionalRefreshSource.next(model);
}
private healthCard = new Subject();
healthCardDetail: Observable<any> = this.healthCard.asObservable();
onClickHealthCard(item:HealthCard) {
this.healthCard.next(item);
}
}
import { Injectable } from "@angular/core";
import { Observable, Subject } from "rxjs";
@Injectable()
export class AppointmentToggleService {
private source = new Subject<boolean>();
subscriber: Observable<boolean> = this.source.asObservable();
toggle(is: boolean) {
this.source.next(is);
}
}
import { Injectable } from "@angular/core";
import { ApiResources, UtilHelper } from "../helpers";
import { HttpService } from ".";
import { Setting } from "../entities";
@Injectable()
export class BannerService {
constructor(private readonly httpService: HttpService) { }
//get(callback?: Function) {
// const request = {
// imageType: "Banner"
// };
// this.httpService
// .get(ApiResources.getURI(ApiResources.setting.base, ApiResources.setting.applyLogo), request)
// .subscribe(
// (response: ImageReports) => {
// callback(response);
// },
// () => {
// callback();
// }
// );
//}
getBannerImage(callback?: Function) {
this.httpService
.get<Array<Setting>>(ApiResources.getURI(ApiResources.setting.base, ApiResources.setting.fetch), { type: "Banner", active: true }, true)
.subscribe(
(response: Array<Setting>) => {
if (response && response.length > 0) {
if (UtilHelper.isEmpty(response[0].imageUrl)) {
response[0].imageUrl = `${ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.getProfileImage)}?imagePath=${response[0].imageUrl}`;
callback(response[0].imageUrl);
}
}
},
() => {
callback();
}
);
}
}
import { Injectable } from "@angular/core";
import { HttpService } from "./http.service";
import { ApiResources } from "../helpers";
import { NotifyService } from "./notify.service";
import { MasterBillModel } from "../entities";
import { Router } from "@angular/router";
@Injectable()
export class BillNotificationService {
masterBill: Array<MasterBillModel>;
constructor(
private readonly httpService: HttpService,
private readonly notifyService: NotifyService,
private readonly router: Router,
) {
this.masterBill = new Array<MasterBillModel>();
}
get(patientId?: number) {
const request = {
patientId: patientId
}
this.httpService
.post(ApiResources.getURI(ApiResources.masterbill.base, ApiResources.masterbill.fetchPatientDue), request)
.subscribe(
(response: Array<MasterBillModel>) => {
this.masterBill = response;
if (response && response.length > 0) {
this.notifyService.confirm(`You are having Payment Due in <b>${this.masterBill[0].modulesName}</b>, Do you want to pay ?`, () => {
this.onPayDue(this.masterBill[0].encryptedPatientId)
}, () => { $("#printButton").click(); })
}
},
() => {
}
);
}
onPayDue(encryptedPatientId: string) {
this.router.navigateByUrl(`app/masters/final-master-bill/${encryptedPatientId}`);
}
}
\ No newline at end of file
import { EventEmitter, Injectable } from '@angular/core';
import { HttpTransportType, HubConnection, HubConnectionBuilder, IHttpConnectionOptions, LogLevel } from '@microsoft/signalr';
import { AppConfig } from "@shared/services";
import { UtilHelper } from '../helpers';
import { CommunicationMessageModel } from '../models';
@Injectable()
export class CommunicationService {
public connectionStatus: boolean;
public individualConnectionStatus: boolean;
public hubConnection: HubConnection;
public customGroups: Array<CommunicationGroupMeta>;
messageReceived = new EventEmitter<CommunicationMessageModel>();
public uniqueId: string;
public appConfigUrl: any;
constructor() {
this.customGroups = new Array<CommunicationGroupMeta>();
}
/* Initial Connections */
public createConnection(callback?: Function) {
const myInterval = setInterval(() => {
const appConfigUrl = { ...AppConfig.settings };
if (UtilHelper.isEmpty(appConfigUrl["signalR"])) {
const url = appConfigUrl["signalR"];
this.create(url);
clearInterval(myInterval);
callback && callback()
}
}, 10);
}
private create(url: string) {
const options = {
transport: HttpTransportType.ServerSentEvents,
logging: LogLevel.Information,
// accessTokenFactory: () => { return Token.getToken() }
} as IHttpConnectionOptions;
this.hubConnection = new HubConnectionBuilder()
.withUrl(url, options)
.withAutomaticReconnect()
.build();
}
public startConnection(id: string, callback?: Function): void {
this.hubConnection
.start()
.then(() => {
console.info("Communication Started.");
this.connectionStatus = true;
this.subscribeToGroup(id, true, () => {
callback && callback();
});
})
.catch(err => {
console.info("Communication failed to start.");
console.error(err);
this.connectionStatus = false;
//setTimeout(() => {
// this.startConnection(id);
//}, 5000);
});
}
public stopConnection(): void {
this.unsubscribeToAllGroup();
this.hubConnection
.stop()
.then(() => {
console.info("Communication stopped.");
this.connectionStatus = false;
this.customGroups = new Array<CommunicationGroupMeta>();
})
.catch(err => {
console.log("Communication failed to stop.");
console.error(err);
//setTimeout(() => {
// this.stopConnection();
//}, 10000);
});
}
/* Groups */
public subscribeToGroup(groupName: string, isIndividual = false, onSuccess: () => void = () => { }, onFailure: () => void = () => { }) {
if (!this.connectionStatus) {
onFailure();
return;
}
this.hubConnection.invoke("SubscribeToGroup", groupName)
.then(() => {
if (isIndividual) {
this.individualConnectionStatus = true;
} else {
let group = this.customGroups.find(x => x.groupName === groupName);
if (!group) {
group = new CommunicationGroupMeta();
group.groupName = groupName;
group.status = true;
this.customGroups.push(group);
} else {
group.status = true;
}
}
onSuccess();
}).catch(err => {
console.log("Cominication failed to subscribe to group");
console.error(err);
if (isIndividual) {
this.individualConnectionStatus = false;
} else {
const group = this.customGroups.find(x => x.groupName === groupName);
if (group) {
group.status = false;
}
}
//if (isIndividual) {
// setTimeout(() => {
// this.subscribeToGroup(groupName, true);
// }, 10000);
//}
});
}
public unsubscribeToGroup(groupName: string) {
this.hubConnection.invoke("UnsubscribeToGroup", groupName)
.then(() => {
this.customGroups = this.customGroups.filter(x => x.groupName !== groupName);
})
.catch(err => {
console.log("Cominication failed to unsubscribe from group");
console.error(err);
});
}
public unsubscribeToAllGroup() {
this.customGroups.forEach(groupName => {
this.hubConnection.invoke("UnsubscribeToGroup", groupName)
.catch(err => {
console.log("Cominication failed to unsubscribe from all group");
console.error(err);
});
});
}
sendMessage(message: CommunicationMessageModel) {
this.hubConnection.invoke("Communication", message);
}
/* Send Messages */
public sendGlobalMessage(message: CommunicationMessageMeta) {
this.hubConnection.invoke("CommunicationGlobal", message);
}
public sendGroupMessage(message: CommunicationMessageMeta) {
this.hubConnection.invoke("CommunicationGroup", message);
}
/* Helpers */
public getConnectionStatus(groupName: string): boolean | null {
const group = this.customGroups.find(x => x.groupName === groupName);
return group ? group.status : null;
}
//private subscribeToIndividualCommunication(id: string) {
// this.hubConnection.invoke(Wordings.subscribeIndividual, id)
// .then(() => {
// this.individualConnectionStatus = true;
// }).catch(err => {
// this.individualConnectionStatus = false;
// console.error(err.toString());
// setTimeout(() => {
// this.subscribeToIndividualCommunication(id);
// }, 5000);
// });
//}
//private unsubscribeToIndividualCommunication(id: string) {
// this.hubConnection.invoke(Wordings.unsubscribeIndividual, id)
// .catch(err => console.error(err.toString()));
//}
}
export class CommunicationGroupMeta {
groupName: string;
status: boolean;
}
export class CommunicationMessageMeta {
type: number;
uniqueId: string;
mainEid: string;
subEid: string;
message: string;
groupName: string;
ownerEid: string;
}
import { Injectable } from "@angular/core";
import { ControlType } from "../enums/control-type.enum";
@Injectable()
export class DashboardService {
getControlType = (dataType: string) => {
switch (dataType) {
case "boolean":
case "bool":
return ControlType.Boolean;
case "date":
return ControlType.Date;
case "varchar":
case "text":
return ControlType.Text;
default:
return ControlType.Number;
}
}
}
import { Injectable } from "@angular/core";
import { Observable, Subject } from "rxjs";
@Injectable()
export class FinalBillService {
private source = new Subject<boolean>();
get: Observable<boolean> = this.source.asObservable();
set(isRefresh: boolean) {
this.source.next(isRefresh);
}
}
import { Injectable } from "@angular/core";
import { HttpErrorInfo } from '../models';
@Injectable()
export class HttpErrorService {
messages: Array<HttpErrorInfo>;
timeout: any;
constructor() {
this.messages = new Array<HttpErrorInfo>();
}
add(model: HttpErrorInfo) {
this.messages = new Array<HttpErrorInfo>();
this.messages.push(model);
clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
this.messages = new Array<HttpErrorInfo>();
}, 3000);
}
close = () => {
clearTimeout(this.timeout);
this.messages = new Array<HttpErrorInfo>();
}
}
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
@Injectable()
export class HttpService {
constructor(
private readonly http: HttpClient
) {
}
get<TResponse>(apiEndPoint: string, request?: any, auth = true): Observable<TResponse> {
let headers = new HttpHeaders();
if (!auth) {
headers = headers.append("Auth", "True");
}
return this.http.get<TResponse>(apiEndPoint, { headers: headers, params: request });
}
post<TResponse>(apiEndPoint: string, request: any, auth = true): Observable<TResponse> {
let headers = new HttpHeaders();
if (!auth) {
headers = headers.append("Auth", "False");
}
return this.http.post<TResponse>(apiEndPoint, request, { headers: headers });
}
put<TResponse>(apiEndPoint: string, request: any, auth = true): Observable<TResponse> {
let headers = new HttpHeaders();
if (!auth) {
headers = headers.append("Auth", "False");
}
return this.http.put<TResponse>(apiEndPoint, request, { headers: headers });
}
delete<TResponse>(apiEndPoint: string, request?: any, auth = true): Observable<TResponse> {
let headers = new HttpHeaders();
if (!auth) {
headers = headers.append("Auth", "True");
}
return this.http.delete<TResponse>(apiEndPoint, { headers: headers, params: request });
}
postFile<TResponse>(apiEndPoint: string, request: any, auth = true): Observable<TResponse> {
let headers = new HttpHeaders();
if (!auth) {
headers = headers.append("Auth", "True");
}
return this.http.post<TResponse>(apiEndPoint, request, { headers: headers, reportProgress: true });
}
}
\ No newline at end of file
import { Injectable } from "@angular/core";
import { HttpService } from ".";
import { Setting } from "../entities";
import { ApiResources, UtilHelper } from "../helpers";
@Injectable()
export class IconService {
constructor(private readonly httpService: HttpService) { }
getIconImage(callback?: Function) {
this.httpService
.get<Array<Setting>>(ApiResources.getURI(ApiResources.setting.base, ApiResources.setting.fetch), { type: "Icon", active: true }, true)
.subscribe({
next: (response: Array<Setting>) => {
if (response && response.length > 0) {
if (response[0].active) {
if (UtilHelper.isEmpty(response[0].imageUrl)) {
response[0].imageUrl = `${ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.getProfileImage)}?imagePath=${response[0].imageUrl}`;
callback(response[0].imageUrl);
}
}
}
},
error: () => {
callback();
}
});
}
}
import { HttpClient } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { Observable } from "rxjs";
import { ApiResources } from "@shared/helpers";
import { IUserAccount, IAuthToken } from "@shared/models";
export const appUrls = {
login: "/login",
home: "/app/dashboard",
notFound: "/not-found",
serverError: "/server-error",
forbidden: "/forbidden"
}
@Injectable()
export class IdentityService {
headers: Object = { headers: { ignoreLoadingBar: "", "Auth": "False" } };
constructor(
private readonly http: HttpClient,
private readonly modalService: NgbModal
) {
}
signIn(account: IUserAccount): Observable<Response> {
return this.http.post<Response>(location.origin + location.pathname + "api/identity/sign-in", account, this.headers);
}
signOut(): Observable<Response> {
if (this.modalService.hasOpenModals()) {
this.modalService.dismissAll();
}
return this.http.post<Response>(location.origin + location.pathname + "api/identity/sign-out", {}, this.headers);
}
status(): Observable<number> {
return this.http.post<number>(location.origin + location.pathname + "api/identity/status", {}, this.headers);
}
get(): Observable<IUserAccount> {
return this.http.post<IUserAccount>(location.origin + location.pathname + "api/identity/get", {}, this.headers);
}
update(authToken: IAuthToken): Observable<Response> {
return this.http.post<Response>(location.origin + location.pathname + "api/identity/update", authToken, this.headers);
}
refreshToken(reference: string): Observable<IAuthToken> {
const request = { token: reference };
const apiEndPoint = ApiResources.getURI(ApiResources.account.base, ApiResources.account.refresh);
return this.http.put<IAuthToken>(apiEndPoint, request);
}
}
\ No newline at end of file
export * from "../../app.config";
export * from "../../app.data";
export * from "./appointment-refresh.service";
export * from "./appointment-toggle.service";
export * from "./banner.service";
export * from "./bill-notificaton.service";
export * from "./communication.service";
export * from "./dashboard.service";
export * from "./final-bill.service";
export * from "./http-error.service";
export * from "./http.service";
export * from "./icon.service";
export * from "./identity.service";
export * from "./jitsi.service";
export * from "./menu.service";
export * from "./notify.service";
export * from "./print-option.service";
export * from "./print.service";
export * from "./queue.service";
export * from "./redirect-appointment.service";
export * from "./resource.service";
export * from "./setting.service";
export * from "./shared.service";
export * from "./timeline-toggle.service";
export * from "./url.service";
export * from "./validator.service";
export * from "./video-link.service";
import { Injectable } from "@angular/core";
import { Observable, Subject } from "rxjs";
@Injectable()
export class JitsiService {
isRoomActive = false;
ipAddress: string;
private jitsiSource = new Subject();
jitsiAccount: Observable<any> = this.jitsiSource.asObservable();
call(accountId: {}) {
this.jitsiSource.next(accountId);
}
private callSource = new Subject();
callAccount: Observable<any> = this.callSource.asObservable();
joinCall(roomName: {}) {
this.callSource.next(roomName);
}
private closeSource = new Subject<boolean>();
closeAccount: Observable<boolean> = this.closeSource.asObservable();
closeCall(is: boolean) {
this.closeSource.next(is);
}
private emergencySource = new Subject<object>();
emergencyAccount: Observable<object> = this.emergencySource.asObservable();
emergency(is: object) {
this.emergencySource.next(is);
}
private endSource = new Subject<string>();
endAccount: Observable<string> = this.endSource.asObservable();
endCall(roomName: string) {
this.endSource.next(roomName);
}
}
import { Injectable } from "@angular/core";
import { ActivatedRoute, Params } from "@angular/router";
import { AllowType, MenuType } from "../enums";
import { ApiResources } from "../helpers";
import { IMenuModel, IMenuOverAllModel } from "../models";
import { HttpService } from "./http.service";
import { NotifyService } from "./notify.service";
@Injectable()
export class MenuService {
private records: Array<IMenuModel>;
private access: boolean;
isHitMenu = true;
private menuButtonCodes: Array<string>;
constructor(
private readonly notifyService: NotifyService,
private readonly httpService: HttpService,
) { }
private setFromLocal = () => {
if (!this.records) {
const localMenus = localStorage.getItem("menus");
if (localMenus) {
const data = (JSON.parse(localMenus) as IMenuOverAllModel);
this.records = data.menus;
this.access = data.isFullAccess;
this.menuButtonCodes = data.menuButtonCodes;
this.isHitMenu = true;
}
}
}
private compare = (a: IMenuModel, b: IMenuModel) => {
if (a.priority < b.priority) {
return -1;
}
if (a.priority > b.priority) {
return 1;
}
return 0;
}
fetch = (accountId: number, roleId: number, callback?: Function) => {
this.httpService
.post<IMenuOverAllModel>(ApiResources.getURI(ApiResources.account.base,
ApiResources.account.getMenus),
{ accountId: accountId, roleId: roleId }, false)
.subscribe((data: IMenuOverAllModel) => {
this.setMenus = data;
this.isHitMenu = false;
callback();
});
}
getFirstSubMenuByUrl = (url: string) => {
const lastIndex = url.lastIndexOf("/");
url = url.substring(0, lastIndex);
const record = this.records.find(x => x.url.toLowerCase() === url.toLowerCase());
if (record) {
const subMenu = this.records.filter(x =>
x.menuTypeId === MenuType.SubMenu &&
x.mainPage === record.mainPage &&
x.url.indexOf(":") === -1);
if (subMenu.length > 0) {
return subMenu[0].url;
}
}
return null;
}
menus = (menuType: MenuType = null, mainPage: string = null, subPage: string = null): Array<IMenuModel> => {
this.setFromLocal();
if (!this.records) return new Array<IMenuModel>();
let filtered = this.records;
if (menuType) {
filtered = filtered.filter(x => MenuType.SubMenu === menuType
? x.menuTypeId === menuType || x.menuTypeId === MenuType.CategoryMenu
: x.menuTypeId === menuType);
}
if (mainPage) {
filtered = filtered.filter(x => x.mainPage === mainPage);
}
if (subPage) {
filtered = filtered.filter(x => x.subPage === subPage);
}
const final = filtered.sort(this.compare);
final.forEach(item => {
const urlTokens = item.url.split("/");
for (let i = urlTokens.length - 1; i >= 0; i--) {
if (urlTokens[i].indexOf(":") === -1) {
item.subPage = urlTokens[i];
break;
}
}
});
return final;
}
set setMenus(data: IMenuOverAllModel) {
this.records = data.menus;
this.access = data.isFullAccess;
this.menuButtonCodes = data.menuButtonCodes;
localStorage.setItem("menus", JSON.stringify(data));
}
get getDefaultRoute(): string {
this.setFromLocal();
return this.records && this.records.length > 0 ? this.records[0].url : "login";
}
removeFromLocal = () => {
localStorage.removeItem("menus");
}
isMenuButtonAllowed = (code: string) => {
if(!this.menuButtonCodes) {
this.setFromLocal();
}
return this.access || (this.menuButtonCodes || [] as Array<string>).find(x => x === code);
}
isAllowed = (uri: string, showNotify = false): AllowType | string => {
this.setFromLocal();
if (!this.records) return AllowType.BreakIt;
if (this.access) return AllowType.Allowed;
const currentSplit = uri.split("/");
let isOverallPass = false;
const matchedUrls = this.records.filter(x => x.count === currentSplit.length);
for (let i = 0; i < matchedUrls.length; i++) {
const url = matchedUrls[i].url;
let isPass = false;
const existingSplit = url.split("/");
for (let j = 0; j < existingSplit.length; j++) {
const item = existingSplit[j];
if (item.indexOf(":") !== -1) {
isPass = true;
continue;
}
if (j >= currentSplit.length) {
isPass = false;
break;
}
if (item === currentSplit[j]) {
isPass = true;
} else {
isPass = false;
break;
}
}
if (isPass) {
isOverallPass = true;
break;
}
}
if (showNotify && !isOverallPass) {
this.notifyService.hideAll();
const isAlternative = this.getFirstSubMenuByUrl(uri);
if (isAlternative) {
return isAlternative;
} else {
this.notifyService.info(`You do not have access to this page (${uri}).`);
}
}
return isOverallPass ? AllowType.Allowed : AllowType.NotAllowed;
}
getNextRoute = (url: string, params: Params, route: ActivatedRoute): Promise<string> => {
return new Promise(async (resolve) => {
let foundUrl = decodeURIComponent(decodeURIComponent(url));
const parentParams = route.parent.params["value"] || {};
const childParams = (params.params ? params.params : params) || {};
const allParams = { ...parentParams, ...childParams };
Object.keys(allParams).forEach((key) => {
const decodedValue = decodeURIComponent(decodeURIComponent(allParams[key]));
foundUrl = foundUrl.replace(`/${decodedValue}/`, `/:${key}/`);
})
const currentRoute = this.records.find((x) => x.url === foundUrl);
if (currentRoute) {
let nextRoute = this.records.find((x) => {
const basicCondition = this.basicCondition(x, currentRoute);
return currentRoute.menuTypeId === MenuType.CategoryMenu
? basicCondition && x.category === currentRoute.category
: basicCondition;
});
if (nextRoute) {
resolve(this.getReverseStrategyLink(nextRoute.url, allParams));
}
if (currentRoute.menuTypeId === MenuType.CategoryMenu) {
nextRoute = this.records.find((x) => this.basicCondition(x, currentRoute));
if (nextRoute) {
resolve(this.getReverseStrategyLink(nextRoute.url, allParams));
}
}
nextRoute = this.records.find((x) => x.mainPage === currentRoute.mainPage && x.menuTypeId === MenuType.SubMenu && x.priority === 1);
if (nextRoute) {
resolve(this.getReverseStrategyLink(nextRoute.url, allParams));
}
}
return resolve(null);
})
}
getCurrentRoute = (url: string, params: Params, route: ActivatedRoute): Promise<IMenuModel> => {
return new Promise(async (resolve) => {
let foundUrl = decodeURIComponent(decodeURIComponent(url));
const parentParams = route.parent.params["value"] || {};
const childParams = (params.params ? params.params : params) || {};
const allParams = { ...parentParams, ...childParams };
Object.keys(allParams).forEach((key) => {
const decodedValue = decodeURIComponent(decodeURIComponent(allParams[key]));
foundUrl = foundUrl.replace(`/${decodedValue}`, `/:${key}`);
})
const currentRoute = this.records.find((x) => x.url === foundUrl);
return resolve(currentRoute);
})
}
private getReverseStrategyLink = (url: string, params: Params) => {
let foundUrl = url;
const obj = params;
Object.keys(obj).forEach((key) => {
const encodedValue = encodeURIComponent(decodeURIComponent(decodeURIComponent(obj[key])));
foundUrl = foundUrl.replace(`:${key}`, encodedValue);
})
return foundUrl;
}
private basicCondition = (compateTo: IMenuModel, compareWith: IMenuModel) => {
if (compareWith) {
return compateTo.mainPage === compareWith.mainPage && compateTo.priority === (compareWith.priority + 1);
}
return false;
}
}
import { Injectable } from "@angular/core";
import * as bootbox from "bootbox";
import { ToastrService } from "ngx-toastr";
function emptyFunction() { }
@Injectable()
export class NotifyService {
constructor(private readonly toastrService: ToastrService) { }
hideAll() {
return bootbox.hideAll();
}
warningToast(message: string) {
this.toastrService.warning(message, "Warning!");
}
infoToast(message: string) {
this.toastrService.info(message, "Information!");
}
successToast(message: string) {
this.toastrService.success(message, "Success!");
}
errorToast(message: string) {
this.toastrService.error(message, "Error!");
}
defaultErrorToast() {
this.toastrService.error("Sorry! Error occurred. Please try again later.", "Error!");
}
warning(message: string, callback?: any) {
message = message || "Warning";
return bootbox.dialog({
title: `<i class="fe-alert-triangle h1 text-warning"></i>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Ok",
className: "btn-sm btn-warning",
callback: callback === null ? emptyFunction : callback
}
}
});
}
info(message: string, callback?: any) {
message = message || "Information";
return bootbox.dialog({
title: `<i class="fe-info h1 text-info"></i>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Ok",
className: "btn-sm btn-info",
callback: callback === null ? emptyFunction : callback
}
}
});
}
success(message: string, callback?: any) {
message = message || "Success";
return bootbox.dialog({
title: `<i class="fe-check-circle h1 text-success"></i>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Ok",
className: "btn-sm btn-success",
callback: callback === null ? emptyFunction : callback
}
}
});
}
error(message: string, callback?: any) {
message = message || "Error";
return bootbox.dialog({
title: `<i class="fe-alert-circle h1 text-danger"></i>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Ok",
className: "btn-sm btn-danger",
callback: callback === null ? emptyFunction : callback
}
}
});
}
defaultError(callback?: any) {
return bootbox.dialog({
title: `<i class="fe-alert-circle h1 text-danger"></i>`,
message: "Sorry error occurred. Please try again later.",
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Ok",
className: "btn-sm btn-danger",
callback: callback === null ? emptyFunction : callback
}
}
});
}
delete(yesCallback?: any, noCallback?: any) {
return bootbox.dialog({
title: `<i class="fe-help-circle h1 text-danger"></i><h4>Are you sure?</h4>`,
message: "Do you really want to delete this record? This process cannot be undone.",
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Yes! Delete",
className: "btn-sm btn-danger mr-1",
callback: yesCallback === null ? emptyFunction : yesCallback
},
no: {
label: "No! Cancel",
className: "btn-sm btn-light",
callback: noCallback === null ? emptyFunction : noCallback
}
}
});
}
confirm(message: string, yesCallback?: any, noCallback?: any) {
return bootbox.dialog({
title: `<i class="fe-help-circle h1 text-danger"></i><h4>Are you sure?</h4>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Yes! Confirm",
className: "btn-sm btn-success mr-1",
callback: yesCallback === null ? emptyFunction : yesCallback
},
no: {
label: "No! Cancel",
className: "btn-sm btn-danger",
callback: noCallback === null ? emptyFunction : noCallback
}
}
});
}
advancedConfirm(message: string, yesLabel: string, yesCallback?: any) {
return bootbox.dialog({
title: `<i class="fe-help-circle h1 text-primary"></i><h4>Are you sure?</h4>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: yesLabel,
className: "btn-sm btn-primary mr-1",
callback: yesCallback === null ? emptyFunction : yesCallback
}
}
});
}
endCallConfirm(message: string, endMeetingCallback?: any, leaveMeetingCallback?: any) {
return bootbox.dialog({
title: `<i class="fe-help-circle h1 text-primary"></i><h4>Are you sure?</h4>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "End Call",
className: "btn-sm btn-danger mr-1",
callback: endMeetingCallback === null ? emptyFunction : endMeetingCallback
},
leave: {
label: "Leave Call",
className: "btn-sm btn-warning mr-1",
callback: leaveMeetingCallback === null ? emptyFunction : leaveMeetingCallback
},
no: {
label: "Cancel",
className: "btn-sm btn-light"
}
}
});
}
SampleAcceptionConfirm(message: string, endMeetingCallback?: any, leaveMeetingCallback?: any) {
return bootbox.dialog({
title: `<i class="fe-help-circle h1 text-primary"></i><h4>Are you sure?</h4>`,
message: message,
closeButton: false,
className: "modal fade effect-scale",
buttons: {
yes: {
label: "Sample Accept",
className: "btn-sm btn-outline-success mr-1",
callback: endMeetingCallback === null ? emptyFunction : endMeetingCallback
},
leave: {
label: "Sample Reject",
className: "btn-sm btn-outline-danger mr-1",
callback: leaveMeetingCallback === null ? emptyFunction : leaveMeetingCallback
},
no: {
label: "Back",
className: "btn-sm btn-light"
}
}
});
}
}
\ No newline at end of file
import { Injectable } from "@angular/core";
import { ApiResources, UtilHelper } from "../helpers";
//import { PrintSetting } from "../entities/print-setting.entity";
import { HttpService } from ".";
import { Setting } from "../entities";
@Injectable()
export class PrintOptionService {
constructor(private readonly httpService: HttpService,) { }
get(callback?: Function) {
this.httpService
.get<Array<Setting>>(ApiResources.getURI(ApiResources.setting.base, ApiResources.setting.fetch), { name: "IsPrintLogo", active: true }, true)
.subscribe(
(response:Array<Setting>) => {
if (response && response.length > 0 ) {
if (response[0].active) {
UtilHelper.removeWithOutLogoStyleFile();
} else {
//UtilHelper.addWithOutLogoStyleFile();
}
callback(response[0].active);
}
},
() => {
callback(true);
}
);
}
}
import { Injectable } from "@angular/core";
import { NotifyService } from "./notify.service";
declare let qz: any;
@Injectable()
export class PrintService {
printer: any;
printerName: any;
isDotMatrixPrinting: boolean;
dotMatrixStatus: string;
constructor(private readonly notifyService: NotifyService) { }
getPrinterName = () => {
return localStorage.getItem("DotMatrixPrinterName");
}
setPrinterName = (name: string) => {
localStorage.setItem("DotMatrixPrinterName", name);
this.printerName = localStorage.getItem("DotMatrixPrinterName");
}
getPrinters = (callback?: Function) => {
qz.printers.find().then((data: Array<any>) => {
callback(data);
}).catch((e) => {
callback(new Array<any>());
this.notifyService.warning(e);
});
}
getAvailablePrinters = (callback?: Function) => {
if (!qz.websocket.isActive()) {
qz.websocket.connect().then(() => {
this.getPrinters(callback);
}).catch((e) => {
this.notifyService.warning(e);
});
} else {
this.getPrinters(callback);
}
}
private findPrinter(callback?: Function) {
this.printerName = this.getPrinterName();
if (!this.printerName) {
this.notifyService.warning("Please select printer.");
callback();
}
qz.printers.find(this.printerName).then((data) => {
this.printer = data;
this.dotMatrixStatus = "Connected";
callback();
}).catch((e) => {
this.notifyService.warning(e);
this.isDotMatrixPrinting = false;
});
}
private connect(callback?: Function) {
this.dotMatrixStatus = "Connecting...";
qz.websocket.connect().then(() => {
this.findPrinter(() => {
callback();
});
}).catch((e) => {
this.notifyService.warning(e);
this.isDotMatrixPrinting = false;
});
}
private print(htmlToRender: any, configObj: any, callback?: Function) {
this.dotMatrixStatus = "Printing...";
const data = [{
type: 'pixel',
format: 'html',
flavor: 'plain',
data: htmlToRender
}];
const config = qz.configs.create(null, configObj);
if (!this.printer) {
this.findPrinter(() => {
config.setPrinter(this.printer);
qz.print(config, data).then(() => {
this.dotMatrixStatus = "Printed";
this.isDotMatrixPrinting = false;
callback();
}).catch((e) => {
this.notifyService.warning(e);
this.isDotMatrixPrinting = false;
});
});
} else {
config.setPrinter(this.printer);
qz.print(config, data).then(() => {
this.dotMatrixStatus = "Printed";
this.isDotMatrixPrinting = false;
callback();
}).catch((e) => {
this.notifyService.warning(e);
this.isDotMatrixPrinting = false;
});
}
}
start = (htmlToRender: any, config: any, callback?: Function) => {
this.dotMatrixStatus = "checking...";
this.isDotMatrixPrinting = true;
try {
if (!qz.websocket.isActive()) {
this.connect(() => {
this.print(htmlToRender,
config,
() => {
this.isDotMatrixPrinting = false;
callback();
});
});
} else {
this.print(htmlToRender,
() => {
this.isDotMatrixPrinting = false;
callback();
});
}
} catch (e) {
this.notifyService.warning(e);
this.isDotMatrixPrinting = false;
}
}
disconnect = () => {
if (qz.websocket.isActive()) {
qz.websocket.disconnect();
}
}
}
import { Injectable } from "@angular/core";
@Injectable()
export class QueueService {
selectedProvider: BasicProvider;
isInterval: any;
}
export interface BasicProvider {
name: string;
id: number;
}
import { Injectable } from "@angular/core";
import { BehaviorSubject, Observable } from "rxjs";
@Injectable()
export class RedirectAppointmentService {
private source = new BehaviorSubject(null);
account: Observable<string> = this.source.asObservable();
set(accountId: string) {
this.source.next(accountId);
}
}
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { ApiResources } from "@shared/helpers";
import { IMedicationAsync, IResource } from "@shared/models";
import { Observable } from "rxjs";
//import { AppData } from "@shared/services";
@Injectable()
export class ResourceService {
constructor(private readonly http: HttpClient) {
}
private fetch(apiEndPoint: string, auth?: boolean, request?: any): Observable<Array<IResource>> {
let headers = new HttpHeaders();
headers = headers.append("Auth", auth ? "True" : "False");
return this.http.get<Array<IResource>>(apiEndPoint, { headers: headers, params: request });
}
private fetchWithLocation(apiEndPoint: string, request?: any): Observable<Array<IResource>> {
let headers = new HttpHeaders();
headers = headers.append("Auth", "True");
return this.http.get<Array<IResource>>(apiEndPoint, { headers: headers, params: request });
}
appointments(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.appointments), true, { searchParam: searchParam });
}
countries() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.countries));
}
insuranceTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchInsuranceTypes));
}
howDidYouKnow() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.howDidYouKnow));
}
education() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.education));
}
occupation() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.occupation));
}
widgetTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.widgetTypes));
}
widgets(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.widgets), true, { searchParam: searchParam });
}
specializations() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.specializations), true);
}
locationSpecializations(locationId?: number, encryptedProviderId?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationSpecializations), true, { locationId: locationId, encryptedProviderId: encryptedProviderId });
}
services() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.services), true);
}
department() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.department), true);
}
providerDepartment() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerDepartment), true);
}
ScanPatients(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.ScanPatients), true, { searchParam: searchParam });
}
patients(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patients), true, { searchParam: searchParam });
}
babyPatients(searchParam: string, isBabyRegistration) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patients), true, { searchParam: searchParam, isBabyRegistration: isBabyRegistration });
}
patientsAll() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patients), true, { searchParam: "" });
}
outPatients() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.outPatients), true, { searchParam: "" });
}
departments(providerId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.departments), true, { providerId: providerId });
}
surgeryTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.surgeryTypes), true);
}
provider(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.provider), true, { searchParam: searchParam });
}
medicationAsync(searchParam: string) {
let headers = new HttpHeaders();
headers = headers.append("Auth", "True");
return this.http.get<Array<IMedicationAsync>>(ApiResources.getURI(ApiResources.progressReport.base, ApiResources.progressReport.medicationsAsync), { headers: headers, params: { searchParam: searchParam } });
}
labsAsync(searchParam: string) {
let headers = new HttpHeaders();
headers = headers.append("Auth", "True");
return this.http.get<Array<any>>(ApiResources.getURI(ApiResources.progressReportLab.base, ApiResources.progressReportLab.labsAsync), { headers: headers, params: { searchParam: searchParam } });
}
newLabsAsync(term: string, chargeCategoryId: number) {
return this.fetch(ApiResources.getURI(ApiResources.labs.base, ApiResources.labs.fetchlabsChargeofChargeCategory), true, { term: term, chargeCategoryId: chargeCategoryId });
}
providersWithInPatientCharges(searchParam: string, isAdmission: boolean) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerWithCharges), true, { searchParam: searchParam, isAdmission });
}
relationships() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.relationships), true);
}
insuranceCompanies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.insuranceCompanies), true);
}
tpaCompanies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.tpaCompanies), true);
}
defaultChargeCategory() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.defaultChargeCathgory), true);
}
labOrders() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labOrder), true);
}
labOrder(query?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labOrders), true, { providerId: query });
}
radiologies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.radiology), true);
}
providerLocations(providerId: number, specializationId?: number, locationId?: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerLocations), { providerId: providerId, specializationId: specializationId, locationId: locationId });
}
providers(departmentId?: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providers), { departmentId: departmentId });
}
providerOnly(providerId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerOnly), true, { providerId: providerId });
}
providerForSchdule(providerId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerSchdule), true, { providerId: providerId });
}
specializationForSchdule() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.specializationForProviderAvialability), true);
}
assignees() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAdminSuperAdmin), true);
}
lookups(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.lookups), true, { searchParam: searchParam });
}
lookupValues(searchParam: string, lookupId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.lookupValues), true, { searchParam: searchParam, lookupId: lookupId });
}
documentCategories() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.documentCategories), true);
}
drugs(query: string, searchValue: string, medicineSearchType: string, providerId?: number) {
return medicineSearchType === "Homeopathy" ? this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.homeopathyDrugs), true, { searchParam: query, searchValue: searchValue }) : this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.drugs), true, { searchParam: query, searchValue: searchValue, medicineSearchType: medicineSearchType, providerId: providerId });
}
generalAdvice(query?: number, encryptedAppointmentId?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.generalAdvice), true, { providerId: query, encryptedAppointmentId: encryptedAppointmentId });
}
icdCodes(query?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.icdCode), true, { providerId: query });
}
roles() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.role));
}
rolesWithOutPatient() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.rolesWithOutPatient));
}
logTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.logType));
}
fetchAdminSuperAdminUsers() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAdminSuperAdmin), true);
}
fetchUsers(roleId: number, searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchUsers),
true,
{ roleId: roleId, searchParam: searchParam });
}
fetchNurses() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchNurses),
true, {});
}
fetchAllUsers() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAllUsers), true);
}
fetchGeneralWardNurses() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchGeneralWardNurses), true);
}
fetchShifts() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchShifts), true);
}
fetchSlots(shiftId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchSlots), true, { shiftId: shiftId });
}
fetchPatientInsurances(admissionId: number, appointmentId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientInsurances), true, { admissionId: admissionId, appointmentId: appointmentId });
}
practiceLocations(countryId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.practiceLocations), true, { countryId: countryId });
}
languages() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.languages), true);
}
questions() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.questions), true);
}
users() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchUsersOnly), true);
}
patient() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchPatient), true);
}
pharmacyCategories() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyCategories), true);
}
pharmacyCompanies() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyCompanies), true);
}
pharmacyProducts(id?: number, searchTerm: string = null) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyProducts), true, { categoryId: id, searchTerm: searchTerm });
}
pharmacyProduct(optionalText1: string = null, searchTerm: string = null) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyProduct), true, { categoryName: optionalText1, searchTerm: searchTerm });
}
problemList(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.problemList), true, { searchParam: searchParam });
}
instructions() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.instructions), true);
}
familyMembers(appointmentId: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.familyMembers), true, { appointmentId: appointmentId });
}
radiologyOrders(query?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.radiologyOrders), true, { providerId: query });
}
receiptReports(id: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.receiptReports), true, { roleId: id });
}
floors() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.floors), true);
}
allFloors(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allFloors), true, { locationId: locationId });
}
wards(floorId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.wards), true, { floorId: floorId });
}
allWards(floorId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allWards), true, { floorId: floorId });
}
rooms(wardId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.rooms), true, { wardId: wardId });
}
allRooms(wardId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allRooms), true, { wardId: wardId });
}
beds(roomId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.beds), true, { roomId: roomId });
}
allBeds(roomId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allBeds), true, { roomId: roomId });
}
bedStatus() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.bedStatus), true);
}
allScanMachines(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allScanMachines), true, { locationId: locationId });
}
allScanTests() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allScanTests), true);
}
scanMachineFilterMachines(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanMachineFilterMachines), true, { locationId: locationId });
}
scanMachineFilterTests(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanMachineFilterTests), true, { locationId: locationId });
}
allLocationScanTests(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allLocationScanTests), true, { locationId: locationId });
}
encounterLookups(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.encounterLookups), true, { searchParam: searchParam });
}
encounterLookupValues(searchParam: string, lookupId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.encounterLookupValues), true, { searchParam: searchParam, lookupId: lookupId });
}
category() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyProducts), true);
}
getAllAccountsExpectPassedRoleId(id: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allAccountWithoutCurrentRoleId), true, { roleId: id })
}
patientDoctorOnly(id: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientDoctorsOnly), { patientId: id });
}
patientAdmissionDoctorOnly(id: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientAdmissionDoctorOnly), { patientId: id });
}
patientAppointmentDoctorOnly(id: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientAppointmentDoctorOnly), { patientId: id });
}
pharmacyLogTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pharmacyLogType), true);
}
inventoryLogTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.inventoryLogType), true);
}
labLogTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labLogType), true);
}
scanLogTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanLogType), true);
}
dischargeStatuses() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.dischargeStatus), true);
}
labName() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labName), true);
}
providerNames() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providername));
}
payType(isSalucro?: boolean) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.payType), false, { isSalucro: isSalucro });
}
allPayTypes(onlyActive: boolean) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allPayTypes), false, { onlyActive: onlyActive });
}
packages() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.packages), true)
}
demandProducts() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.demandProducts), true)
}
images(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchImages), true, { id: id });
}
states(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.states), true, { id: id });
}
cities(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.cities), true, { id: id });
}
retailStoreNames() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.retailStore));
}
warehouseNames() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.wareHouse));
}
inventoryWarehouseNames() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.inventoryWareHouse));
}
mealType() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.mealType));
}
providerPracticeLocation(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerPracticeLocation), true, { locationId: locationId });
}
admissionProviders(departmentId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.admissionProviders), true, { departmentId: departmentId });
}
problems() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.problems), true);
}
goals(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.goals), true, { problemIds: searchParam });
}
objectives(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.objectives), true, { goalIds: searchParam });
}
interventions(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.interventions), true, { objectiveIds: searchParam });
}
locations() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locations), true);
}
hwcPatients() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.hwcPatient));
}
allHWCPatients() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.allHWCPatients));
}
widgetCountTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.widgetCountTypes));
}
appointmentTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.appointmentTypes));
}
referredByTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.referredByNames));
}
labDepartments() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labDepartment));
}
labMasters() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labMaster));
}
labvacutainers() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.labVacutainer));
}
scanMachine() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanMachines))
}
scanMachineMaster(locationId?: number) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanMachineMaster), { locationId: locationId });
}
scanMachineTest(scanMachineMasterId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchScanMachineTest), true, { scanMachineMasterId: scanMachineMasterId });
}
scanClassification(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanClassification), true, { locationId: locationId });
}
getAncNumber(patientId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.getAncNumber), true, { patientId: patientId });
}
getPatientBMI(patientId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.getPatientBMI), true, { patientId: patientId });
}
scanSubClassification(classificationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanSubClassification), true, { classificationId: classificationId });
}
scanSubClassificationTests(locationId?: number, classificationId?: number, subClassificationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanSubClassificationTests), true, { locationId: locationId, classificationId: classificationId, subClassificationId: subClassificationId });
}
locationAccount(accountId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationMapAccount), true, { accountId: accountId });
}
locationAccountDynamic(type: string, value: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationMapAccountDynamic), true, { type, value });
}
fetchSupportAndAdminUsersAssignee() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAdminAndSupportAssignee), true);
}
activePatients(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.activePatients), true, { searchParam: searchParam });
}
registeredPatients(searchParam: string, fromDate: string, toDate: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.registeredPatients), true, { searchParam: searchParam, fromDate: fromDate, toDate: toDate });
}
providerSpecializations(providerId: number, encryptedProviderId?: string, locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerSpecializations), true, { providerId: providerId, encryptedProviderId: encryptedProviderId, locationId: locationId });
}
locationProviders(locationId?: number, encryptedProviderId?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationProviders), true, { locationId: locationId, encryptedProviderId: encryptedProviderId })
}
inventoryProdcut(id?: number, searchTerm: string = null) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.inventoryProduct), true, { categoryId: id, searchTerm: searchTerm });
}
notificationTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.notificationTypes))
}
payCategories() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.payCategories))
}
consultationType() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.consultationType));
}
availabilityChargeType(chargeId?: number, providerAvailabilitySlotId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.availabilityChargeType), true, { chargeId: chargeId, providerAvailabilitySlotId: providerAvailabilitySlotId });
}
providerAvailability(providerId: number, specializationId?: number, locationId?: number, consultationTypeId?: number, appointmentDate?: string) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerAvailability), { providerId: providerId, specializationId: specializationId, locationId: locationId, consultationTypeId: consultationTypeId, appointmentDate: appointmentDate });
}
receiptAreaTypeId() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.receiptAreaTypeId));
}
activeStatus() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.activeStatus));
}
partsOfDay(providerId: number, specializationId?: number, locationId?: number, startDate?: string, endDate?: string) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.partsOfDay), { providerId: providerId, specializationId: specializationId, locationId: locationId, startDate: startDate, endDate: endDate });
}
encounterType() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.encounterType), true);
}
locationScanTest(locationId?: number, scanMachineMasterId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationScanTest), true, { locationId: locationId, scanMachineMasterId: scanMachineMasterId })
}
locationScanMachine(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationScanMachine), true, { locationId: locationId })
}
scanMachinesTests(scanTestMasterId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchScanMachinesTests), true, { scanTestMasterId: scanTestMasterId });
}
categoryType(scanTestMasterId?: number, locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchScanTestCategoryTypes), true, { scanTestMasterId: scanTestMasterId, locationId: locationId });
}
fetchRooms() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchRooms), true);
}
caseTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchCaseTypes), true);
}
emergencyCaseTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchEmergencyCaseTypes), true);
}
counsellingTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.counsellingTypes), true);
}
admissionPayTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchAdmissionPayTypes), true);
}
checkNewPatientAppointment(patientId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.checkNewPatientAppointment), true, { patientId: patientId });
}
referralDotor() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.referralDoctor), true);
}
doctorWeek() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.doctorWeek));
}
consultatDoctors(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.consultantDoctor), true, { searchParam: searchParam });
}
menuAccessedRoles(currentUrl: string) {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.menuAccessedRoles), { url: currentUrl });
}
pathologyProviders() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.pathologyProviders));
}
scanAvailabilityStatus() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanAvailabilityStatus));
}
scanAvailabilityReason() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanAvailabilityReason));
}
scanScrollResult() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanScrollResult));
}
chargeCategory() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.chargeCategory), true);
}
locationsForPractice(practiceId?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationForPractice), true, { practiceId: practiceId });
}
practiceLocationsForProvider(providerId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.practiceLocationsForProvider), true, { providerId: providerId });
}
chargeCategoryForLocations(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.chargeCategoryLocation), true, { locationId: locationId });
}
otRoomMaster() {
return this.fetchWithLocation(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.otRoomMaster))
}
surgeryNames() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.surgeryNames), true);
}
providersForOt() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providersForOt), true);
}
getAllAccountsExpectRoleId(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.accountWithExpectedRole), true, { roleId: id })
}
anaesthesiaTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.anaesthesiaTypes), true);
}
idProofNames() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.idProofNames), true);
}
locationOTSurgeris(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.locationSurgeries), true, { locationId: locationId })
}
surgeris() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.surgeris), true);
}
otRoomSurgeryTest(surgeryId?: number, otRoomId?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchOTRoomSurgery), true, { surgeryId: surgeryId, otRoomId: otRoomId });
}
discountNames() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.discountNames), true);
}
SessionType() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.SessionType), true);
}
inPatients(searchParam: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.inPatients), true, { searchParam: searchParam });
}
visitTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.visitTypes));
}
uniqueOTRooms(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.uniqueOTRooms), true, { locationId: locationId })
}
healthCard() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.healthCard))
}
surgeries(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchSurgeries), true, { locationId: locationId })
}
ambulances() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.ambulances));
}
driversDetails() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.drivers));
}
reasons() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.reasons));
}
authority() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.authorityMaster));
}
doctorUnit(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.doctorUnit), true, { locationId: locationId });
}
providerSignature() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerSignature));
}
providerAccountLocationMap(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.providerAccountLocationMap), true, { locationId: locationId });
}
scanProviderLocationBased(locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanProviderLocationBased), true, { locationId: locationId });
}
medicationFrequency(type?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.medicationFrequency), true, { type: type });
}
lookUpValueOnLookUpName(name?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.lookupValueOnLookupName), true, { name: name });
}
providerAvailableLocations(encryptedProviderId?: string, locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.fetchProviderLocation), true, { encryptedProviderId: encryptedProviderId, locationId: locationId });
}
scanDistinctOutPatients(fromDate: string, toDate: string, locationId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanDistinctOutPatients), true, { fromDate: fromDate, toDate: toDate, locationId: locationId });
}
scanBulkRCPatients(fromDate: string, toDate: string, locationId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanBulkRCPatients), true, { fromDate: fromDate, toDate: toDate, locationId: locationId });
}
dietGuidlines(typeId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.dietGuidlines), true, { typeId: typeId });
}
packageModules(locationId: number, packageType: string, moduleType: string): Observable<IResource[]> {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.packageModules), true, { locationId, packageType, moduleType });
}
packageTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.packageTypes));
}
moduleTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.moduleTypes));
}
dietTypes() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.dietTypes));
}
doctorAppointmentNotice(locationId?: number, providerId?: number, appointmentDate?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.doctorAppointmentNotice), true, { locationId: locationId, providerId: providerId, appointmentDate: appointmentDate });
}
scanAppointmentNotice(locationId?: number, machineId?: number, appointmentDate?: string) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scanAppointmentNotice), true, { locationId: locationId, machineId: machineId, appointmentDate: appointmentDate });
}
emergencyDetail() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.emergencyDetails), true)
}
patientRegistrationCharges(locationId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.patientRegistrationCharges), true, { locationId: locationId });
}
practice() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.practice), true);
}
encounterLookUp() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.enounterLookUp), true);
}
encounterLookupvalues(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.encounterLookupvalues), true, { lookupId: id });
}
scantestMachines(locationId?: number, scanTestMasterId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.scantestMachines), true, { locationId: locationId, scanTestMasterId: scanTestMasterId });
}
admissionPatient(searchParam: string, locationId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.admissionPatients), true, { searchParam: searchParam, locationId: locationId });
}
parentPatient(parentPatietId?: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.parentPatient), true, { parentPatientId: parentPatietId });
}
lWareHouses(id: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.lWareHouses), true, { id: id });
}
retailStoreWare(wId: number) {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.retailStoreWare), true, { wId: wId });
}
encounterTemplates() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.encounterTemplates), true);
}
modulesMaster() {
return this.fetch(ApiResources.getURI(ApiResources.resources.base, ApiResources.resources.modulesMaster));
}
}
\ No newline at end of file
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