Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • LLD-changes
  • db-changes
  • develop-beta
  • drAPIChanges
  • feature/create-doctors
  • feature/doctor-master-seed-data
  • feature/missing-models-columns
  • feature/uuid-removal-db-changes
  • feature/uuid-v7-changes
  • fetch-api-4.3
  • hotFixHospitalSearch
  • hotFixHospitalTestCases
  • hotfix-create-doctor-api-qualification-chnages
  • hotfix-create-doctor-updated-lld
  • hotfix/HCP-26-create-doctor-testcase-fix
  • hotfix/city-state-id-addition
  • hotfix/doc-registration-city-state-id-fix
  • hotfixDoctorsApi
  • master
  • new-lld-change
  • revert-19d45991
  • revert-48d0d502
  • seedFileChanges
  • seedFileHotFix
  • updateDRAPI
25 results

Target

Select target project
  • roshan.suvarnkar/hospital-service
  • prathviraj.thokal/hospital-service
2 results
Select Git revision
  • LLD-changes
  • db-changes
  • develop-beta
  • drAPIChanges
  • feature/create-doctors
  • feature/doctor-master-seed-data
  • feature/missing-models-columns
  • feature/uuid-removal-db-changes
  • feature/uuid-v7-changes
  • fetch-api-4.3
  • hotFixHospitalSearch
  • hotFixHospitalTestCases
  • hotfix-create-doctor-api-qualification-chnages
  • hotfix-create-doctor-updated-lld
  • hotfix/HCP-26-create-doctor-testcase-fix
  • hotfix/city-state-id-addition
  • hotfix/doc-registration-city-state-id-fix
  • hotfixDoctorsApi
  • master
  • new-lld-change
  • revert-19d45991
  • revert-48d0d502
  • seedFileChanges
  • seedFileHotFix
  • updateDRAPI
25 results
Show changes

Commits on Source 2

......@@ -5,7 +5,11 @@
@created <YYYY-MM-DD>
**/
import { seedModel, seedWithRelation, seedWithMultipleParents, ForeignKeyConfig } from 'nest-common-utilities';
import {
seedModel,
seedWithMultipleParents,
ForeignKeyConfig,
} from 'nest-common-utilities';
import { PrismaService } from './prisma/prisma.service';
// Instantiate Prisma service
......@@ -42,45 +46,204 @@ const userData = [
},
];
const hospitalSpecialtyMasterData = [
{ name: 'Super-Speciality', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Multi-Speciality', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Cancer Hospital', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Maternity', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Eye Hospital', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'ENT', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Orthopedic', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Nursing Home', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Ayurvedic', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Dental', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Childcare/Pediatric', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Daycare', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Urology', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'General Hospital', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Surgical', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Secondary', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Nurology', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BURNS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'COVID Temporary Hospital', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Cardiac', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
];
const hospitalTypeMasterData = [
{ name: 'Government', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Corporate', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Private', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Mission', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Trust', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Memorial', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Individual', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Research Institute', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
];
const hospitalCareMasterData = [
{ name: 'Primary', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Secondary', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Tertiary', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Tertiary Plus', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const hospitalSpecialtyMasterData: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Super-Speciality',
userName: 'Prathviraj',
},
{
name: 'Multi-Speciality',
userName: 'Prathviraj',
},
{
name: 'Cancer Hospital',
userName: 'Prathviraj',
},
{
name: 'Maternity',
userName: 'Prathviraj',
},
{
name: 'Eye Hospital',
userName: 'Prathviraj',
},
{
name: 'ENT',
userName: 'Prathviraj',
},
{
name: 'Orthopedic',
userName: 'Prathviraj',
},
{
name: 'Nursing Home',
userName: 'Prathviraj',
},
{
name: 'Ayurvedic',
userName: 'Prathviraj',
},
{
name: 'Dental',
userName: 'Prathviraj',
},
{
name: 'Childcare/Pediatric',
userName: 'Prathviraj',
},
{
name: 'Daycare',
userName: 'Prathviraj',
},
{
name: 'Urology',
userName: 'Prathviraj',
},
{
name: 'General Hospital',
userName: 'Prathviraj',
},
{
name: 'Surgical',
userName: 'Prathviraj',
},
{
name: 'Secondary',
userName: 'Prathviraj',
},
{
name: 'Nurology',
userName: 'Prathviraj',
},
{
name: 'BURNS',
userName: 'Prathviraj',
},
{
name: 'COVID Temporary Hospital',
userName: 'Prathviraj',
},
{
name: 'Cardiac',
userName: 'Prathviraj',
},
];
const hospitalSpecialtyMasterDataForeignKeys: ForeignKeyConfig<
(typeof hospitalSpecialtyMasterData)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitalTypeMasterData: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Government',
userName: 'Prathviraj',
},
{
name: 'Corporate',
userName: 'Prathviraj',
},
{
name: 'Private',
userName: 'Prathviraj',
},
{
name: 'Mission',
userName: 'Prathviraj',
},
{
name: 'Trust',
userName: 'Prathviraj',
},
{
name: 'Memorial',
userName: 'Prathviraj',
},
{
name: 'Individual',
userName: 'Prathviraj',
},
{
name: 'Research Institute',
userName: 'Prathviraj',
},
];
const hospitalTypeMasterDataForeignKeys: ForeignKeyConfig<
(typeof hospitalTypeMasterData)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitalCareMasterData: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Primary',
userName: 'Prathviraj',
},
{
name: 'Secondary',
userName: 'Prathviraj',
},
{
name: 'Tertiary',
userName: 'Prathviraj',
},
{
name: 'Tertiary Plus',
userName: 'Prathviraj',
},
];
const hospitalCareMasterDataForeignKeys: ForeignKeyConfig<
(typeof hospitalCareMasterData)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitalDiscountMasterData = [
......@@ -98,52 +261,338 @@ const hospitalDiscountMasterData = [
{ name: 'Professional Fees Charges', is_active: true },
];
const hospitalRoomTypesData = [
{ name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const hospitalRoomTypesData: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'ICU',
userName: 'Prathviraj',
},
];
const hospitalRoomTypesDataForeignKeys: ForeignKeyConfig<
(typeof hospitalRoomTypesData)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitalRoomCategoriesData = [
{ name: 'General', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Semi-Private', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Private', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Deluxe', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Super Deluxe', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Suite', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'ICU', room_name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'NICU', room_name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Private - AC', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Private - DAC', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'HDUI - High Dependency Unit', room_name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'CCU - Cardiac Care Unit', room_name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Day Care', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Isolation Room', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Triple Share', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Labour Room', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'President Room', room_name: 'ROOM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DIALYSIS', room_name: 'ICU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const hospitalRoomCategoriesData: Array<{
name: string;
userName: string;
roomName: string;
room_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'General',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Semi-Private',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Private',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Deluxe',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Super Deluxe',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Suite',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'ICU',
roomName: 'ICU',
userName: 'Prathviraj',
},
{
name: 'NICU',
roomName: 'ICU',
userName: 'Prathviraj',
},
{
name: 'Private - AC',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Private - DAC',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'HDUI - High Dependency Unit',
roomName: 'ICU',
userName: 'Prathviraj',
},
{
name: 'CCU - Cardiac Care Unit',
roomName: 'ICU',
userName: 'Prathviraj',
},
{
name: 'Day Care',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Isolation Room',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Triple Share',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'Labour Room',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'President Room',
roomName: 'ROOM',
userName: 'Prathviraj',
},
{
name: 'DIALYSIS',
roomName: 'ICU',
userName: 'Prathviraj',
},
];
const hospitalRoomCategoriesDataForeignKeys: ForeignKeyConfig<
(typeof hospitalRoomCategoriesData)[0]
>[] = [
{
parentModel: 'hospital_room_types',
parentLookupKey: 'name',
childReferenceKey: 'roomName',
childForeignKeyField: 'room_id',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const stateMasterData = [
{ name: 'Maharashtra', state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Karnataka', state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const stateMasterData: Array<{
name: string;
userName: string;
state_hcs_id: number;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Maharashtra',
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Karnataka',
state_hcs_id: 2,
userName: 'Prathviraj',
},
];
const stateMasterDataForeignKeys: ForeignKeyConfig<
(typeof stateMasterData)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const cityMasterData = [
{ name: 'Mumbai', state_name: 'Maharashtra', city_hcs_id: 1, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Pune', state_name: 'Maharashtra', city_hcs_id: 2, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Latur', state_name: 'Maharashtra', city_hcs_id: 3, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Dhule', state_name: 'Maharashtra', city_hcs_id: 4, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Solapur', state_name: 'Maharashtra', city_hcs_id: 5, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Bangalore', state_name: 'Karnataka', city_hcs_id: 6, state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Hubbli', state_name: 'Karnataka', city_hcs_id: 7, state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Mangalore', state_name: 'Karnataka', city_hcs_id: 8, state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Udupi', state_name: 'Karnataka', city_hcs_id: 9, state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Bidar', state_name: 'Karnataka', city_hcs_id: 10, state_hcs_id: 2, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const cityMasterData: Array<{
name: string;
userName: string;
stateName: string;
city_hcs_id: number;
state_hcs_id: number;
state_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Mumbai',
stateName: 'Maharashtra',
city_hcs_id: 1,
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Pune',
stateName: 'Maharashtra',
city_hcs_id: 2,
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Latur',
stateName: 'Maharashtra',
city_hcs_id: 3,
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Dhule',
stateName: 'Maharashtra',
city_hcs_id: 4,
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Solapur',
stateName: 'Maharashtra',
city_hcs_id: 5,
state_hcs_id: 1,
userName: 'Prathviraj',
},
{
name: 'Bangalore',
stateName: 'Karnataka',
city_hcs_id: 6,
state_hcs_id: 2,
userName: 'Prathviraj',
},
{
name: 'Hubbli',
stateName: 'Karnataka',
city_hcs_id: 7,
state_hcs_id: 2,
userName: 'Prathviraj',
},
{
name: 'Mangalore',
stateName: 'Karnataka',
city_hcs_id: 8,
state_hcs_id: 2,
userName: 'Prathviraj',
},
{
name: 'Udupi',
stateName: 'Karnataka',
city_hcs_id: 9,
state_hcs_id: 2,
userName: 'Prathviraj',
},
{
name: 'Bidar',
stateName: 'Karnataka',
city_hcs_id: 10,
state_hcs_id: 2,
userName: 'Prathviraj',
},
];
const cityMasterDataForeignKeys: ForeignKeyConfig<
(typeof cityMasterData)[0]
>[] = [
{
parentModel: 'state_master',
parentLookupKey: 'name',
childReferenceKey: 'stateName',
childForeignKeyField: 'state_id',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const districtMasterData = [
{ name: 'Mumbai', state_name: 'Maharashtra', district_hcs_id: 1, state_hcs_id: 1, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const districtMasterData: Array<{
name: string;
userName: string;
stateName: string;
district_hcs_id: number;
state_hcs_id: number;
state_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Mumbai',
stateName: 'Maharashtra',
district_hcs_id: 1,
state_hcs_id: 1,
userName: 'Prathviraj',
},
];
const districtMasterDataForeignKeys: ForeignKeyConfig<
(typeof districtMasterData)[0]
>[] = [
{
parentModel: 'state_master',
parentLookupKey: 'name',
childReferenceKey: 'stateName',
childForeignKeyField: 'state_id',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const regionMasterData = [
......@@ -157,232 +606,407 @@ const pincodeData: Array<{
name: string;
stateName: string;
cityName: string;
city_hcs_id: Number;
state_hcs_id: Number;
pincode_hcs_id: Number;
created_by: String;
updated_by: String;
city_hcs_id: number;
state_hcs_id: number;
pincode_hcs_id: number;
userName: string;
// Add these missing foreign key fields:
state_id?: string;
city_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{ name: '400078', cityName: 'Mumbai', city_hcs_id: 1, state_hcs_id: 1, pincode_hcs_id: 1, stateName: 'Maharashtra', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400079', cityName: 'Mumbai', city_hcs_id: 1, state_hcs_id: 1, pincode_hcs_id: 1, stateName: 'Maharashtra', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400033', cityName: 'Latur', city_hcs_id: 3, state_hcs_id: 1, pincode_hcs_id: 1, stateName: 'Maharashtra', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400604', cityName: 'Solapur', city_hcs_id: 5, state_hcs_id: 1, pincode_hcs_id: 1, stateName: 'Maharashtra', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400011', cityName: 'Mangalore', city_hcs_id: 8, state_hcs_id: 2, pincode_hcs_id: 1, stateName: 'Karnataka', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400012', cityName: 'Mangalore', city_hcs_id: 8, state_hcs_id: 2, pincode_hcs_id: 1, stateName: 'Karnataka', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400023', cityName: 'Udupi', city_hcs_id: 9, state_hcs_id: 2, pincode_hcs_id: 1, stateName: 'Karnataka', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: '400644', cityName: 'Hubbli', city_hcs_id: 7, state_hcs_id: 2, pincode_hcs_id: 1, stateName: 'Karnataka', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{
name: '400078',
cityName: 'Mumbai',
city_hcs_id: 1,
state_hcs_id: 1,
pincode_hcs_id: 1,
stateName: 'Maharashtra',
userName: 'Prathviraj',
},
{
name: '400079',
cityName: 'Mumbai',
city_hcs_id: 1,
state_hcs_id: 1,
pincode_hcs_id: 1,
stateName: 'Maharashtra',
userName: 'Prathviraj',
},
{
name: '400033',
cityName: 'Latur',
city_hcs_id: 3,
state_hcs_id: 1,
pincode_hcs_id: 1,
stateName: 'Maharashtra',
userName: 'Prathviraj',
},
{
name: '400604',
cityName: 'Solapur',
city_hcs_id: 5,
state_hcs_id: 1,
pincode_hcs_id: 1,
stateName: 'Maharashtra',
userName: 'Prathviraj',
},
{
name: '400011',
cityName: 'Mangalore',
city_hcs_id: 8,
state_hcs_id: 2,
pincode_hcs_id: 1,
stateName: 'Karnataka',
userName: 'Prathviraj',
},
{
name: '400012',
cityName: 'Mangalore',
city_hcs_id: 8,
state_hcs_id: 2,
pincode_hcs_id: 1,
stateName: 'Karnataka',
userName: 'Prathviraj',
},
{
name: '400023',
cityName: 'Udupi',
city_hcs_id: 9,
state_hcs_id: 2,
pincode_hcs_id: 1,
stateName: 'Karnataka',
userName: 'Prathviraj',
},
{
name: '400644',
cityName: 'Hubbli',
city_hcs_id: 7,
state_hcs_id: 2,
pincode_hcs_id: 1,
stateName: 'Karnataka',
userName: 'Prathviraj',
},
];
const pincodeForeignKeys: ForeignKeyConfig<(typeof pincodeData)[0]>[] = [
{
parentModel: 'state_master',
parentLookupKey: 'name',
childReferenceKey: 'stateName',
childForeignKeyField: 'state_id',
},
{
parentModel: 'city_master',
parentLookupKey: 'name',
childReferenceKey: 'cityName',
childForeignKeyField: 'city_id',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitalCorporateData: Array<{
name: string;
address: string;
locality: string;
stateName: string;
cityName: string;
district_id: string;
regionName: string;
pincodeName: string;
email_id: string;
website: string;
contact_hash: string;
latitude: number;
longitude: number;
contact_no: string;
userName: string;
// Add these missing foreign key fields:
state_id?: string;
city_id?: string;
region_id?: string;
pincode_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Apollo Hospitals',
address: '123 Health Street',
locality: 'Greenfield',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-1',
regionName: 'East',
pincodeName: '400078',
email_id: 'contact@apollo.com',
website: 'https://apollo.com',
contact_hash: 'hash-apollo',
latitude: 12.971598,
longitude: 77.594566,
contact_no: '+91-9000000001',
userName: 'Prathviraj',
},
{
name: 'Fortis Hospital',
address: '456 Care Avenue',
locality: 'Bluefield',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-2',
regionName: 'East',
pincodeName: '400078',
email_id: 'info@fortis.com',
website: 'https://fortis.com',
contact_hash: 'hash-fortis',
latitude: 28.613939,
longitude: 77.209023,
contact_no: '+91-9000000002',
userName: 'Prathviraj',
},
{
name: 'Max Healthcare',
address: '789 Wellness Road',
locality: 'Sunview',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-3',
regionName: 'East',
pincodeName: '400078',
email_id: 'contact@max.com',
website: 'https://maxhealthcare.in',
contact_hash: 'hash-max',
latitude: 19.07609,
longitude: 72.877426,
contact_no: '+91-9000000003',
userName: 'Prathviraj',
},
{
name: 'Manipal Hospitals',
address: '321 Care Lane',
locality: 'Eastfield',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-4',
regionName: 'East',
pincodeName: '400078',
email_id: 'info@manipal.com',
website: 'https://manipalhospitals.com',
contact_hash: 'hash-manipal',
latitude: 13.08268,
longitude: 80.270721,
contact_no: '+91-9000000004',
userName: 'Prathviraj',
},
{
name: 'Narayana Health',
address: '555 Heartway',
locality: 'Westend',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-5',
regionName: 'East',
pincodeName: '400078',
email_id: 'care@narayana.com',
website: 'https://narayanahealth.org',
contact_hash: 'hash-narayana',
latitude: 17.385044,
longitude: 78.486671,
contact_no: '+91-9000000005',
userName: 'Prathviraj',
},
{
name: 'AIIMS Delhi',
address: 'Aurobindo Marg',
locality: 'Ansari Nagar',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-6',
regionName: 'East',
pincodeName: '400078',
email_id: 'aiims@aiims.edu',
website: 'https://aiims.edu',
contact_hash: 'hash-aiims',
latitude: 28.5672,
longitude: 77.21,
contact_no: '+91-9000000006',
userName: 'Prathviraj',
},
{
name: 'Columbia Asia',
address: '789 Global Blvd',
locality: 'Tech Park',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-7',
regionName: 'East',
pincodeName: '400078',
email_id: 'hello@columbiaasia.com',
website: 'https://columbiaasia.com',
contact_hash: 'hash-columbia',
latitude: 13.035,
longitude: 77.597,
contact_no: '+91-9000000007',
userName: 'Prathviraj',
},
{
name: 'Care Hospitals',
address: '12 Health Bay',
locality: 'River View',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-8',
regionName: 'East',
pincodeName: '400078',
email_id: 'care@carehospitals.com',
website: 'https://carehospitals.com',
contact_hash: 'hash-care',
latitude: 18.52043,
longitude: 73.856743,
contact_no: '+91-9000000008',
userName: 'Prathviraj',
},
{
name: 'KIMS Hospitals',
address: '33 Life Drive',
locality: 'Central Zone',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-9',
regionName: 'East',
pincodeName: '400078',
email_id: 'info@kimshospitals.com',
website: 'https://kimshospitals.com',
contact_hash: 'hash-kims',
latitude: 16.506174,
longitude: 80.648015,
contact_no: '+91-9000000009',
userName: 'Prathviraj',
},
{
name: 'Global Hospitals',
address: '44 Medical Square',
locality: 'Hilltop',
stateName: 'Maharashtra',
cityName: 'Mumbai',
district_id: 'District-10',
regionName: 'East',
pincodeName: '400078',
email_id: 'contact@globalhospitals.com',
website: 'https://globalhospitals.com',
contact_hash: 'hash-global',
latitude: 15.299326,
longitude: 74.123993,
contact_no: '+91-9000000010',
userName: 'Prathviraj',
},
];
const hospitalCorporateDataForeignKeys: ForeignKeyConfig<
(typeof hospitalCorporateData)[0]
>[] = [
{
parentModel: 'state_master',
parentLookupKey: 'name',
childReferenceKey: 'stateName',
childForeignKeyField: 'state_id',
},
{
parentModel: 'city_master',
parentLookupKey: 'name',
childReferenceKey: 'cityName',
childForeignKeyField: 'city_id',
},
{
parentModel: 'hospital_region_master',
parentLookupKey: 'name',
childReferenceKey: 'regionName',
childForeignKeyField: 'region_id',
},
{
parentModel: 'pincode_master',
parentLookupKey: 'name',
childReferenceKey: 'pincodeName',
childForeignKeyField: 'pincode_id',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const pincodeForeignKeys: ForeignKeyConfig<typeof pincodeData[0]>[] = [
{ parentModel: 'state_master', parentLookupKey: 'name', childReferenceKey: 'stateName', childForeignKeyField: 'state_id' },
{ parentModel: 'city_master', parentLookupKey: 'name', childReferenceKey: 'cityName', childForeignKeyField: 'city_id' },
const fraudRemarkMasterData: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Blacklisted Hospital',
userName: 'Prathviraj',
},
{
name: 'Hospital flagged by RLMU',
userName: 'Prathviraj',
},
{
name: 'Hospital flagged by other insurance company',
userName: 'Prathviraj',
},
{
name: 'Others',
userName: 'Prathviraj',
},
{
name: 'Fake admission',
userName: 'Prathviraj',
},
{
name: 'Over billing',
userName: 'Prathviraj',
},
{
name: 'Excluded hospital for retail',
userName: 'Prathviraj',
},
{
name: 'For anywhere cashless',
userName: 'Prathviraj',
},
];
const hospitalCorporateData = [
const fraudRemarkMasterDataForeignKeys: ForeignKeyConfig<
(typeof fraudRemarkMasterData)[0]
>[] = [
{
name: 'Apollo Hospitals',
address: '123 Health Street',
locality: 'Greenfield',
state_id: '309197ca-f7c8-4cc3-afb3-8b66101b7c2c',
city_id: '4fd72a95-93e5-4f90-9c42-c7cf560f89e8',
district_id: 'District-1',
region_id: '77552ff2-02b9-4874-a015-18b900572ad0',
pincode_id: '850a5f16-3e47-48b0-b223-b6de7752c26a',
email_id: 'contact@apollo.com',
website: 'https://apollo.com',
contact_hash: 'hash-apollo',
latitude: 12.971598,
longitude: 77.594566,
contact_no: '+91-9000000001',
created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4',
updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4',
created_at: new Date(),
},
// {
// name: 'Fortis Hospital',
// address: '456 Care Avenue',
// locality: 'Bluefield',
// state_id: 'b221fc17-3c6d-413a-adb9-fd36186ae820',
// city_id: 'a5467ba6-c3cc-4561-854b-3dfb417add67',
// district_id: 'District-2',
// region_id: '92182b38-267a-49d5-b691-85a7fb061e96',
// pincode_id: 'fc8cd1dc-c5d3-4ddd-a32d-4f987a28f566',
// email_id: 'info@fortis.com',
// website: 'https://fortis.com',
// contact_hash: 'hash-fortis',
// latitude: 28.613939,
// longitude: 77.209023,
// contact_no: '+91-9000000002',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Max Healthcare',
// address: '789 Wellness Road',
// locality: 'Sunview',
// state_id: 'b221fc17-3c6d-413a-adb9-fd36186ae820',
// city_id: 'f35afb49-f6c9-40cd-9a10-192d1bf10198',
// district_id: 'District-3',
// region_id: '92182b38-267a-49d5-b691-85a7fb061e96',
// pincode_id: 'b9e48b51-7e4c-41d0-a16c-d4830cc1d18d',
// email_id: 'contact@max.com',
// website: 'https://maxhealthcare.in',
// contact_hash: 'hash-max',
// latitude: 19.076090,
// longitude: 72.877426,
// contact_no: '+91-9000000003',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Manipal Hospitals',
// address: '321 Care Lane',
// locality: 'Eastfield',
// state_id: 'b221fc17-3c6d-413a-adb9-fd36186ae820',
// city_id: 'f35afb49-f6c9-40cd-9a10-192d1bf10198',
// district_id: 'District-4',
// region_id: '92182b38-267a-49d5-b691-85a7fb061e96',
// pincode_id: 'b9e48b51-7e4c-41d0-a16c-d4830cc1d18d',
// email_id: 'info@manipal.com',
// website: 'https://manipalhospitals.com',
// contact_hash: 'hash-manipal',
// latitude: 13.082680,
// longitude: 80.270721,
// contact_no: '+91-9000000004',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Narayana Health',
// address: '555 Heartway',
// locality: 'Westend',
// state_id: 'b221fc17-3c6d-413a-adb9-fd36186ae820',
// city_id: '3ba855b0-1ea6-4f1a-910f-38cf8864dc43',
// district_id: 'District-5',
// region_id: 'bfd7081e-80a3-44ae-b435-552865b4a90b',
// pincode_id: '3f1c8f5a-ea3d-4f28-8883-10dc81bf9c6d',
// email_id: 'care@narayana.com',
// website: 'https://narayanahealth.org',
// contact_hash: 'hash-narayana',
// latitude: 17.385044,
// longitude: 78.486671,
// contact_no: '+91-9000000005',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'AIIMS Delhi',
// address: 'Aurobindo Marg',
// locality: 'Ansari Nagar',
// state_id: 'a31910e5-2d7c-4c31-bc0c-2172ce3bdeca',
// city_id: '92724a8e-82de-42f6-bcbe-76655c061029',
// district_id: 'District-6',
// region_id: 'bfd7081e-80a3-44ae-b435-552865b4a90b',
// pincode_id: 'c931b9fd-7005-410d-8be8-3a2efd64b773',
// email_id: 'aiims@aiims.edu',
// website: 'https://aiims.edu',
// contact_hash: 'hash-aiims',
// latitude: 28.567200,
// longitude: 77.210000,
// contact_no: '+91-9000000006',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Columbia Asia',
// address: '789 Global Blvd',
// locality: 'Tech Park',
// state_id: 'a31910e5-2d7c-4c31-bc0c-2172ce3bdeca',
// city_id: '4fa7bb90-b200-4aea-aaca-6d40e1b46d56',
// district_id: 'District-7',
// region_id: '3d57802a-8371-417b-95b8-9eb12e7dd024',
// pincode_id: 'bfe97462-78db-4326-8c00-56f8783431cd',
// email_id: 'hello@columbiaasia.com',
// website: 'https://columbiaasia.com',
// contact_hash: 'hash-columbia',
// latitude: 13.035000,
// longitude: 77.597000,
// contact_no: '+91-9000000007',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Care Hospitals',
// address: '12 Health Bay',
// locality: 'River View',
// state_id: 'a31910e5-2d7c-4c31-bc0c-2172ce3bdeca',
// city_id: '4fa7bb90-b200-4aea-aaca-6d40e1b46d56',
// district_id: 'District-8',
// region_id: '3d57802a-8371-417b-95b8-9eb12e7dd024',
// pincode_id: 'bfe97462-78db-4326-8c00-56f8783431cd',
// email_id: 'care@carehospitals.com',
// website: 'https://carehospitals.com',
// contact_hash: 'hash-care',
// latitude: 18.520430,
// longitude: 73.856743,
// contact_no: '+91-9000000008',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'KIMS Hospitals',
// address: '33 Life Drive',
// locality: 'Central Zone',
// state_id: 'a31910e5-2d7c-4c31-bc0c-2172ce3bdeca',
// city_id: 'cbf0a982-5dc8-47d1-8668-467190baa994',
// district_id: 'District-9',
// region_id: '0c962b88-9b1e-46f1-a424-82170ee89232',
// pincode_id: 'bfe97462-78db-4326-8c00-56f8783431ca',
// email_id: 'info@kimshospitals.com',
// website: 'https://kimshospitals.com',
// contact_hash: 'hash-kims',
// latitude: 16.506174,
// longitude: 80.648015,
// contact_no: '+91-9000000009',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
// {
// name: 'Global Hospitals',
// address: '44 Medical Square',
// locality: 'Hilltop',
// state_id: 'a31910e5-2d7c-4c31-bc0c-2172ce3bdeca',
// city_id: 'cbf0a982-5dc8-47d1-8668-467190baa994',
// district_id: 'District-10',
// region_id: '0c962b88-9b1e-46f1-a424-82170ee89232',
// pincode_id: 'bfe97462-78db-4326-8c00-56f8783431ca',
// email_id: 'contact@globalhospitals.com',
// website: 'https://globalhospitals.com',
// contact_hash: 'hash-global',
// latitude: 15.299326,
// longitude: 74.123993,
// contact_no: '+91-9000000010',
// created_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// updated_by: '29dfbea6-2e23-473c-97b3-07fc3defb8ce',
// created_at: new Date(),
// },
];
const fraudRemarkMasterData = [
{ name: 'Blacklisted Hospital', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Hospital flagged by RLMU', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Hospital flagged by other insurance company', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Others', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Fake admission', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Over billing', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Excluded hospital for retail', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'For anywhere cashless', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const hospitals: Array<{
......@@ -423,9 +1047,8 @@ const hospitals: Array<{
status: string;
fraudRemarkName: string;
remarks: string;
created_by: string;
updated_by: string;
healthcareName: string;
userName: string;
// Add these missing foreign key fields:
corporate_id?: string;
state_id?: string;
......@@ -437,6 +1060,8 @@ const hospitals: Array<{
fraud_remark_id?: string;
pincode_id?: string;
healthcare_type_id?: string;
created_by?: string;
updated_by?: string;
}> = [
{
hospital_no: 'H123',
......@@ -476,107 +1101,451 @@ const hospitals: Array<{
status: 'ACTIVE',
fraudRemarkName: 'For anywhere cashless',
remarks: 'Top rated hospital',
created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4',
updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4',
// district_id: 'DIST123',
// pincode_id: '400011',
userName: 'Prathviraj',
healthcareName: 'Hospital/Nursing Home',
},
];
const hospitalForeignKeys: ForeignKeyConfig<(typeof hospitals)[0]>[] = [
{
parentModel: 'state_master',
parentLookupKey: 'name',
childReferenceKey: 'stateName',
childForeignKeyField: 'state_id',
},
{
parentModel: 'district_master',
parentLookupKey: 'name',
childReferenceKey: 'districtName',
childForeignKeyField: 'district_id',
},
{
parentModel: 'city_master',
parentLookupKey: 'name',
childReferenceKey: 'cityName',
childForeignKeyField: 'city_id',
},
{
parentModel: 'hospital_region_master',
parentLookupKey: 'name',
childReferenceKey: 'regionName',
childForeignKeyField: 'region_id',
},
{
parentModel: 'hospital_type_master',
parentLookupKey: 'name',
childReferenceKey: 'typeName',
childForeignKeyField: 'type_id',
},
{
parentModel: 'hospital_care_master',
parentLookupKey: 'name',
childReferenceKey: 'levelName',
childForeignKeyField: 'level_care_id',
},
{
parentModel: 'hospital_fraud_remarks_master',
parentLookupKey: 'name',
childReferenceKey: 'fraudRemarkName',
childForeignKeyField: 'fraud_remark_id',
},
{
parentModel: 'hospital_corporate',
parentLookupKey: 'name',
childReferenceKey: 'corporateName',
childForeignKeyField: 'corporate_id',
},
{
parentModel: 'pincode_master',
parentLookupKey: 'name',
childReferenceKey: 'pincode',
childForeignKeyField: 'pincode_id',
},
{
parentModel: 'healthcare_type_master',
parentLookupKey: 'name',
childReferenceKey: 'healthcareName',
childForeignKeyField: 'healthcare_type_id',
},
];
const healthCareMaster: Array<{
name: string;
userName: string;
code: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'Hospital/Nursing Home',
code: 'HS',
userName: 'Prathviraj',
},
{
name: 'Clinic',
code: 'CL',
userName: 'Prathviraj',
},
{
name: 'Consultant',
code: 'CN',
userName: 'Prathviraj',
},
{
name: 'Pharmacy',
code: 'PH',
userName: 'Prathviraj',
},
{
name: 'Diagnostic Center',
code: 'DC',
userName: 'Prathviraj',
},
{
name: 'Nursing Agency',
code: 'NS',
userName: 'Prathviraj',
},
{
name: 'Blood Bank',
code: 'BB',
userName: 'Prathviraj',
},
{
name: 'Ambulance',
code: 'AM',
userName: 'Prathviraj',
},
{
name: 'SOS',
code: 'SO',
userName: 'Prathviraj',
},
{
name: 'Wellness Center',
code: 'WC',
userName: 'Prathviraj',
},
{
name: 'Non Network',
code: 'NN',
userName: 'Prathviraj',
},
{
name: 'International Hospital',
code: 'IH',
userName: 'Prathviraj',
},
{
name: 'Gym',
code: 'GY',
userName: 'Prathviraj',
},
{
name: 'Salon',
code: 'SL',
userName: 'Prathviraj',
},
{
name: 'Spa',
code: 'SP',
userName: 'Prathviraj',
},
{
name: 'Yoga Centers',
code: 'YC',
userName: 'Prathviraj',
},
{
name: 'Slimming Centers',
code: 'SC',
userName: 'Prathviraj',
},
{
name: 'Ambulance',
code: 'AM',
userName: 'Prathviraj',
},
{
name: 'Blood Bank',
code: 'BB',
userName: 'Prathviraj',
},
{
name: 'Dental',
code: 'DN',
userName: 'Prathviraj',
},
{
name: 'Spectacles',
code: 'ST',
userName: 'Prathviraj',
},
{
name: 'Home Care Services',
code: 'HC',
userName: 'Prathviraj',
},
{
name: 'Hair and Skin Care',
code: 'HSC',
userName: 'Prathviraj',
},
];
const healthCareMasterForeignKeys: ForeignKeyConfig<
(typeof healthCareMaster)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const doctorSpecialityMaster: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'General Practitioner (GP)',
userName: 'Prathviraj',
},
{
name: 'Pediatrician',
userName: 'Prathviraj',
},
{
name: 'Dermatologist',
userName: 'Prathviraj',
},
{
name: 'Cardiologist',
userName: 'Prathviraj',
},
{
name: 'Ophthalmologist',
userName: 'Prathviraj',
},
{
name: 'Orthopaedic Surgeon',
userName: 'Prathviraj',
},
{
name: 'Neurologist',
userName: 'Prathviraj',
},
{
name: 'Psychiatrist',
userName: 'Prathviraj',
},
{
name: 'OBS/GYN',
userName: 'Prathviraj',
},
{
name: 'Anesthesiologist',
userName: 'Prathviraj',
},
{
name: 'Radiologist',
userName: 'Prathviraj',
},
{
name: 'ENT Specialist',
userName: 'Prathviraj',
},
{
name: 'Urologist',
userName: 'Prathviraj',
},
{
name: 'Endocrinologist',
userName: 'Prathviraj',
},
{
name: 'Gastroenterologist',
userName: 'Prathviraj',
},
{
name: 'Pulmonologist',
userName: 'Prathviraj',
},
{
name: 'Nephrologist',
userName: 'Prathviraj',
},
{
name: 'Oncologist',
userName: 'Prathviraj',
},
{
name: 'Rheumatologist',
userName: 'Prathviraj',
},
{
name: 'Allergist/Immunologist',
userName: 'Prathviraj',
},
{
name: 'Emergency Medicine Physician',
userName: 'Prathviraj',
},
{
name: 'Pathologist',
userName: 'Prathviraj',
},
{
name: 'Infectious Disease Specialist',
userName: 'Prathviraj',
},
];
const doctorSpecialityMasterForeignKeys: ForeignKeyConfig<
(typeof doctorSpecialityMaster)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
const healthCareMaster = [
{ name: 'Hospital/Nursing Home', code: 'HS', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Clinic', code: 'CL', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Consultant', code: 'CN', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Pharmacy', code: 'PH', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Diagnostic Center', code: 'DC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Nursing Agency', code: 'NS', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Blood Bank', code: 'BB', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Ambulance', code: 'AM', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'SOS', code: 'SO', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Wellness Center', code: 'WC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Non Network', code: 'NN', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'International Hospital', code: 'IH', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Gym', code: 'GY', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Salon', code: 'SL', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Spa', code: 'SP', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Yoga Centers', code: 'YC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Slimming Centers', code: 'SC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Ambulance', code: 'AM', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Blood Bank', code: 'BB', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Dental', code: 'DN', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Spectacles', code: 'ST', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Home Care Services', code: 'HC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Hair and Skin Care', code: 'HSC', created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
];
const hospitalForeignKeys: ForeignKeyConfig<typeof hospitals[0]>[] = [
{ parentModel: 'state_master', parentLookupKey: 'name', childReferenceKey: 'stateName', childForeignKeyField: 'state_id' },
{ parentModel: 'district_master', parentLookupKey: 'name', childReferenceKey: 'districtName', childForeignKeyField: 'district_id' },
{ parentModel: 'city_master', parentLookupKey: 'name', childReferenceKey: 'cityName', childForeignKeyField: 'city_id' },
{ parentModel: 'hospital_region_master', parentLookupKey: 'name', childReferenceKey: 'regionName', childForeignKeyField: 'region_id' },
{ parentModel: 'hospital_type_master', parentLookupKey: 'name', childReferenceKey: 'typeName', childForeignKeyField: 'type_id' },
{ parentModel: 'hospital_care_master', parentLookupKey: 'name', childReferenceKey: 'levelName', childForeignKeyField: 'level_care_id' },
{ parentModel: 'hospital_fraud_remarks_master', parentLookupKey: 'name', childReferenceKey: 'fraudRemarkName', childForeignKeyField: 'fraud_remark_id' },
{ parentModel: 'hospital_corporate', parentLookupKey: 'name', childReferenceKey: 'corporateName', childForeignKeyField: 'corporate_id' },
{ parentModel: 'pincode_master', parentLookupKey: 'name', childReferenceKey: 'pincode', childForeignKeyField: 'pincode_id' },
{ parentModel: 'healthcare_type_master', parentLookupKey: 'name', childReferenceKey: 'healthcareName', childForeignKeyField: 'healthcare_type_id' },
];
const doctorSpecialityMaster = [
{ name: 'General Practitioner (GP)', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Pediatrician', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Dermatologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Cardiologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Ophthalmologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Orthopaedic Surgeon', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Neurologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Psychiatrist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'OBS/GYN', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Anesthesiologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Radiologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'ENT Specialist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Urologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Endocrinologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Gastroenterologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Pulmonologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Nephrologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Oncologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Rheumatologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Allergist/Immunologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Emergency Medicine Physician', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Pathologist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'Infectious Disease Specialist', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
];
const doctorQualifications = [
{ name: 'BHMS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BAMS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BUMS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BPT', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'MPT', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BIMS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'MBBS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'MD', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'MS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BDS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'MDS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DHMS', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DA', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DCH', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DGO', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DLO', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DMRD', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'DO', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGDMCH', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGDIM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGMT', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGD-MLRN', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGD-CM', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'PGD-OTN', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
{ name: 'BMLT', is_active: true, created_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4', updated_by: 'ead3e8c9-b539-4e6f-9ce0-053fa8f45ba4' },
const doctorQualifications: Array<{
name: string;
userName: string;
created_by?: string;
updated_by?: string;
}> = [
{
name: 'BHMS',
userName: 'Prathviraj',
},
{
name: 'BAMS',
userName: 'Prathviraj',
},
{
name: 'BUMS',
userName: 'Prathviraj',
},
{
name: 'BPT',
userName: 'Prathviraj',
},
{
name: 'MPT',
userName: 'Prathviraj',
},
{
name: 'BIMS',
userName: 'Prathviraj',
},
{
name: 'MBBS',
userName: 'Prathviraj',
},
{
name: 'MD',
userName: 'Prathviraj',
},
{
name: 'MS',
userName: 'Prathviraj',
},
{
name: 'BDS',
userName: 'Prathviraj',
},
{
name: 'MDS',
userName: 'Prathviraj',
},
{
name: 'DHMS',
userName: 'Prathviraj',
},
{
name: 'DA',
userName: 'Prathviraj',
},
{
name: 'DCH',
userName: 'Prathviraj',
},
{
name: 'DGO',
userName: 'Prathviraj',
},
{
name: 'DLO',
userName: 'Prathviraj',
},
{
name: 'DMRD',
userName: 'Prathviraj',
},
{
name: 'DO',
userName: 'Prathviraj',
},
{
name: 'PGDMCH',
userName: 'Prathviraj',
},
{
name: 'PGDIM',
userName: 'Prathviraj',
},
{
name: 'PGMT',
userName: 'Prathviraj',
},
{
name: 'PGD-MLRN',
userName: 'Prathviraj',
},
{
name: 'PGD-CM',
userName: 'Prathviraj',
},
{
name: 'PGD-OTN',
userName: 'Prathviraj',
},
{
name: 'BMLT',
userName: 'Prathviraj',
},
];
const doctorQualificationsForeignKeys: ForeignKeyConfig<
(typeof doctorQualifications)[0]
>[] = [
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'created_by',
},
{
parentModel: 'user',
parentLookupKey: 'name',
childReferenceKey: 'userName',
childForeignKeyField: 'updated_by',
},
];
/**
......@@ -585,66 +1554,67 @@ const doctorQualifications = [
async function run() {
try {
await seedModel(prisma, 'user' as keyof PrismaService, userData);
await seedModel(
await seedWithMultipleParents(
prisma,
'hospital_speciality_master' as keyof PrismaService,
'hospital_speciality_master', // model name in PrismaService
hospitalSpecialtyMasterData,
hospitalSpecialtyMasterDataForeignKeys,
);
await seedModel(
await seedWithMultipleParents(
prisma,
'hospital_type_master' as keyof PrismaService,
'hospital_type_master', // model name in PrismaService
hospitalTypeMasterData,
hospitalTypeMasterDataForeignKeys,
);
await seedModel(
await seedWithMultipleParents(
prisma,
'hospital_care_master' as keyof PrismaService,
'hospital_care_master', // model name in PrismaService
hospitalCareMasterData,
hospitalCareMasterDataForeignKeys,
);
await seedModel(
prisma,
'hospital_discount_master' as keyof PrismaService,
hospitalDiscountMasterData,
);
await seedModel(
await seedWithMultipleParents(
prisma,
'hospital_room_types' as keyof PrismaService,
'hospital_room_types', // model name in PrismaService
hospitalRoomTypesData,
hospitalRoomTypesDataForeignKeys,
);
await seedWithRelation(
await seedWithMultipleParents(
prisma,
'hospital_room_types' as keyof PrismaService, // parent model name
'hospital_room_categories' as keyof PrismaService, // child model name
hospitalRoomCategoriesData, // child data
'name', // parentLookupKey (hospital_room_types.name)
'room_name', // childToParentKey (hospital_room_categories.room_name)
'room_id', // childForeignKeyField (hospital_room_categories.room_id)
'hospital_room_categories', // model name in PrismaService
hospitalRoomCategoriesData,
hospitalRoomCategoriesDataForeignKeys,
);
await seedModel(
await seedWithMultipleParents(
prisma,
'state_master' as keyof PrismaService,
'state_master', // model name in PrismaService
stateMasterData,
stateMasterDataForeignKeys,
);
await seedWithRelation(
await seedWithMultipleParents(
prisma,
'state_master' as keyof PrismaService, // parent model name
'city_master' as keyof PrismaService, // child model name
cityMasterData, // child data
'name', // parentLookupKey (state_master.name)
'state_name', // childToParentKey (city_master.state_name)
'state_id', // childForeignKeyField (city_master.state_id)
'city_master', // model name in PrismaService
cityMasterData,
cityMasterDataForeignKeys,
);
await seedWithRelation(
await seedWithMultipleParents(
prisma,
'state_master' as keyof PrismaService, // parent model name
'district_master' as keyof PrismaService, // child model name
districtMasterData, // child data
'name', // parentLookupKey (state_master.name)
'state_name', // childToParentKey (city_master.state_name)
'state_id', // childForeignKeyField (city_master.state_id)
'district_master', // model name in PrismaService
districtMasterData,
districtMasterDataForeignKeys,
);
await seedModel(
......@@ -660,20 +1630,32 @@ async function run() {
pincodeForeignKeys,
);
await seedModel(
prisma,
'hospital_corporate' as keyof PrismaService,
hospitalCorporateData,
);
await seedModel(
await seedWithMultipleParents(
prisma,
'hospital_corporate', // model name in PrismaService
hospitalCorporateData,
hospitalCorporateDataForeignKeys,
);
await seedWithMultipleParents(
prisma,
'hospital_fraud_remarks_master' as keyof PrismaService,
'hospital_fraud_remarks_master', // model name in PrismaService
fraudRemarkMasterData,
fraudRemarkMasterDataForeignKeys,
);
await seedModel(prisma, 'healthcare_type_master' as keyof PrismaService, healthCareMaster);
await seedWithMultipleParents(
prisma,
'healthcare_type_master', // model name in PrismaService
healthCareMaster,
healthCareMasterForeignKeys,
);
await seedWithMultipleParents(
prisma,
......@@ -682,8 +1664,18 @@ async function run() {
hospitalForeignKeys,
);
await seedModel(prisma, 'doctor_speciality_master' as keyof PrismaService, doctorSpecialityMaster);
await seedModel(prisma, 'doctor_qualification_master' as keyof PrismaService, doctorQualifications);
await seedWithMultipleParents(
prisma,
'doctor_speciality_master', // model name in PrismaService
doctorSpecialityMaster,
doctorSpecialityMasterForeignKeys,
);
await seedWithMultipleParents(
prisma,
'doctor_qualification_master', // model name in PrismaService
doctorQualifications,
doctorQualificationsForeignKeys,
);
console.log('Data seeded successfully.');
} catch (error) {
......