Skip to content
Snippets Groups Projects
Commit 26e3b715 authored by roshan's avatar roshan
Browse files

api changes

parent 8c158bea
Branches
No related tags found
No related merge requests found
...@@ -55,6 +55,8 @@ export class HospitalService { ...@@ -55,6 +55,8 @@ export class HospitalService {
stateId: h.state_id, stateId: h.state_id,
cityId: h.city_id, cityId: h.city_id,
pincodeId: h.pincode_id, pincodeId: h.pincode_id,
isNonNetwork: h.is_non_network,
hfrId: h.hfr_id
})); }));
} }
...@@ -101,7 +103,7 @@ export class HospitalService { ...@@ -101,7 +103,7 @@ export class HospitalService {
searchTerm: hospitalName || '', searchTerm: hospitalName || '',
limit: take, limit: take,
offset: skip, offset: skip,
similarityThreshold: 0.2, similarityThreshold: 0.1,
where, where,
include: { include: {
pincode_master: true, pincode_master: true,
...@@ -136,7 +138,12 @@ export class HospitalService { ...@@ -136,7 +138,12 @@ export class HospitalService {
const { limit: take, offset: skip } = await this.pagination(page, limit); const { limit: take, offset: skip } = await this.pagination(page, limit);
const [hospitalsData, total] = await Promise.all([ const [hospitalsData, total] = await Promise.all([
this.prisma.hospitals.findMany({ this.prisma.hospitals.findMany({
where: { hfr_id: hospitalId }, where: {
OR: [
{ hfr_id: hospitalId },
{ hospital_no: hospitalId },
],
},
skip, skip,
take, take,
include: { include: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment