From 7787a6dad3973d8c38e2c128deac0a41bc9acb2c Mon Sep 17 00:00:00 2001
From: Manjunath Kumar <manjunath.kumar@niveussolutions.com>
Date: Wed, 18 Jun 2025 16:29:32 +0530
Subject: [PATCH 1/2] duplicate-reg-no-fix

---
 prisma/models/doctor_master.prisma  |   2 +-
 src/doctor/doctor.service.spec.ts   | 115 ++++++++++++----------------
 src/doctor/doctor.service.ts        |  78 +++++++++++++++----
 src/doctor/dto/create-doctor.dto.ts |   4 +
 src/seed.ts                         |  64 ++++++++--------
 5 files changed, 148 insertions(+), 115 deletions(-)

diff --git a/prisma/models/doctor_master.prisma b/prisma/models/doctor_master.prisma
index 8381c7b..1201da5 100644
--- a/prisma/models/doctor_master.prisma
+++ b/prisma/models/doctor_master.prisma
@@ -1,7 +1,7 @@
 model doctor_master {
   id                                  String                      @id @default(uuid()) @db.Uuid
   name                                String                      @db.VarChar(100)
-  registration_no                     String?                     @unique @db.VarChar(100)
+  registration_no                     String?                     @db.VarChar(100)
   speciality_id                       String?                     @db.Uuid
   doctor_contact                      String?                     @db.VarChar(20)
   doctor_email_id                     String?                     @db.VarChar(30)
diff --git a/src/doctor/doctor.service.spec.ts b/src/doctor/doctor.service.spec.ts
index a20cf63..c6d0bb5 100644
--- a/src/doctor/doctor.service.spec.ts
+++ b/src/doctor/doctor.service.spec.ts
@@ -90,10 +90,10 @@ describe('DoctorService', () => {
       latitude: 12.111,
       longitude: 77.222,
     };
-
-    it('should throw AppException if doctor with same regNo or hprCode exists', async () => {
-      (mockPrismaService.doctor_master.findFirst as jest.Mock).mockResolvedValue({ id: 'uuid-existing' });
-
+    it('should throw AppException if doctor not found', async () => {
+      (
+        mockPrismaService.doctor_master.findUnique as jest.Mock
+      ).mockResolvedValue(null);
       await expect(service.updateDoctorById(dto)).rejects.toThrow(AppException);
       expect(mockPrismaService.doctor_master.findFirst).toHaveBeenCalledWith({
         where: {
@@ -246,12 +246,8 @@ describe('addDoctor', () => {
       updated_by: 'updater-uuid',
       doctorQualificationIds: ['qual-1', 'qual-2'],
     };
-    (mockPrismaService.doctor_master.create as jest.Mock).mockResolvedValue({
-      id: 'doc-id',
-    });
-    (
-      mockPrismaService.doctor_qualifications.createMany as jest.Mock
-    ).mockResolvedValue({ count: 2 });
+    (mockPrismaService.doctor_master.create as jest.Mock).mockResolvedValue({id: 'doc-id'});
+    (mockPrismaService.doctor_qualifications.createMany as jest.Mock).mockResolvedValue({count: 2});
 
     const result = await service.addDoctor(dto);
 
@@ -271,12 +267,10 @@ describe('addDoctor', () => {
         name: dto.doctorName,
         speciality_id: dto.doctorSpecialityId,
       }),
-      select: { id: true },
+      select: {id: true},
     }));
 
-    expect(
-        mockPrismaService.doctor_qualifications.createMany,
-    ).toHaveBeenCalledWith({
+    expect(mockPrismaService.doctor_qualifications.createMany).toHaveBeenCalledWith({
       data: [
         {
           doctor_id: 'doc-id',
@@ -296,51 +290,44 @@ describe('addDoctor', () => {
     expect(result).toEqual({ doctorId: 'doc-id' });
   });
 
-  it(
-      `should create a doctor with only required fields, 
-    covering ?? null and updated_by fallback`,
-      async () => {
-        const dto: any = {
-          doctorName: 'Dr. Minimal',
-          doctorSpecialityId: 'spec-uuid',
-          created_by: 'creator-uuid',
-          // doctorQualificationIds: undefined, // explicitly undefined or omitted
-        };
-        (mockPrismaService.doctor_master.create as jest.Mock).mockResolvedValue({
-          id: 'doc-id',
-        });
-        (
-      mockPrismaService.doctor_qualifications.createMany as jest.Mock
-        ).mockResolvedValue({ count: 0 });
-
-        const result = await service.addDoctor(dto);
-
-        expect(mockPrismaService.doctor_master.create).toHaveBeenCalledWith(
-            expect.objectContaining({
-              data: expect.objectContaining({
-                registration_no: null,
-                doctor_contact: null,
-                hpr_code: null,
-                doctor_email_id: null,
-                pan_no: null,
-                address: null,
-                pincode_id: null,
-                latitude: null,
-                longitude: null,
-                created_by: dto.created_by,
-                updated_by: dto.created_by,
-                name: dto.doctorName,
-                speciality_id: dto.doctorSpecialityId,
-              }),
-              select: { id: true },
-            }),
-        );
-
-        expect(
-            mockPrismaService.doctor_qualifications.createMany,
-        ).toHaveBeenCalledTimes(0);
-        expect(result).toEqual({ doctorId: 'doc-id' });
-      });
+  it('should create a doctor with only required fields, covering ?? null and updated_by fallback', async () => {
+    const dto: any = {
+      doctorName: 'Dr. Minimal',
+      doctorSpecialityId: 'spec-uuid',
+      created_by: 'creator-uuid',
+      // doctorQualificationIds: undefined, // explicitly undefined or omitted
+    };
+    (mockPrismaService.doctor_master.create as jest.Mock).mockResolvedValue({id: 'doc-id'});
+    (mockPrismaService.doctor_qualifications.createMany as jest.Mock).mockResolvedValue({count: 0});
+    (mockPrismaService.doctor_master.findFirst as jest.Mock).mockResolvedValue(null);
+    (mockPrismaService.pincode_master.findUnique as jest.Mock).mockResolvedValue({
+      city_id: 'mock-city-id',
+      state_id: 'mock-state-id',
+    });
+    const result = await service.addDoctor(dto);
+
+    expect(mockPrismaService.doctor_master.create).toHaveBeenCalledWith(expect.objectContaining({
+      data: expect.objectContaining({
+        registration_no: null,
+        doctor_contact: null,
+        hpr_code: null,
+        doctor_email_id: null,
+        pan_no: null,
+        address: null,
+        pincode_id: null,
+        latitude: null,
+        longitude: null,
+        created_by: dto.created_by,
+        updated_by: dto.created_by,
+        name: dto.doctorName,
+        speciality_id: dto.doctorSpecialityId,
+      }),
+      select: {id: true},
+    }));
+
+    expect(mockPrismaService.doctor_qualifications.createMany).toHaveBeenCalledTimes(0);
+    expect(result).toEqual({doctorId: 'doc-id'});
+  });
 
   const baseDoctorDto: CreateDoctorDto = {
     doctorName: 'Dr. Test User', emailId: 'test.user@example.com',
@@ -370,7 +357,7 @@ describe('addDoctor', () => {
         created_by: baseDoctorDto.created_by,
         updated_by: baseDoctorDto.updated_by,
       }),
-      select: { id: true },
+      select: {id: true},
     });
     expect(result).toEqual({
       doctorId: '48c48258-5ed4-48be-a1f9-44be7bbeecdd',
@@ -381,15 +368,11 @@ describe('addDoctor', () => {
     (handlePrismaError as jest.Mock).mockImplementation(() => {
       throw new Error('MOCK_HANDLE_PRISMA_ERROR');
     });
-    (mockPrismaService.$transaction as jest.Mock).mockRejectedValue(
-        new Error('Prisma error'),
-    );
+    (mockPrismaService.$transaction as jest.Mock).mockRejectedValue(new Error('Prisma error'));
     const minimalDto: CreateDoctorDto = {
       doctorName: 'Dr. Fail', created_by: 'creator-fail',
       updated_by: 'updater-fail',
     };
-    await expect(service.addDoctor(minimalDto)).rejects.toThrow(
-        'MOCK_HANDLE_PRISMA_ERROR',
-    );
+    await expect(service.addDoctor(minimalDto)).rejects.toThrow('MOCK_HANDLE_PRISMA_ERROR');
   });
 });
diff --git a/src/doctor/doctor.service.ts b/src/doctor/doctor.service.ts
index f4a1299..db164d0 100644
--- a/src/doctor/doctor.service.ts
+++ b/src/doctor/doctor.service.ts
@@ -5,15 +5,20 @@
  @created     <YYYY-MM-DD>
 **/
 
-import { Injectable } from '@nestjs/common';
-import { CreateDoctorDto } from './dto/create-doctor.dto';
-import { PrismaService } from '../prisma/prisma.service';
+import {Injectable} from '@nestjs/common';
+import {CreateDoctorDto} from './dto/create-doctor.dto';
+import {PrismaService} from '../prisma/prisma.service';
 import {
   AppException,
   errorCode,
   handlePrismaError,
   Logger,
 } from 'nest-common-utilities';
+import {UpdateDoctorRequestDto} from './dto/update-doctor-request.dto';
+import {UpdateDoctorResponseDto} from './dto/update-doctor-response.dto';
+import {ListDoctorsRequestDto} from './dto/list-doctors-request.dto';
+import {
+  PaginatedDoctorsResponseDto,
 import { UpdateDoctorRequestDto } from './dto/update-doctor-request.dto';
 import { UpdateDoctorResponseDto } from './dto/update-doctor-response.dto';
 import { ListDoctorsRequestDto } from './dto/list-doctors-request.dto';
@@ -46,11 +51,13 @@ export class DoctorService {
   async pagination(
       page?: number,
       limit?: number,
+      page?: number,
+      limit?: number,
   ): Promise<{ limit: number; offset: number }> {
     const safeLimit = limit && limit > 0 ? limit : 10;
     const safePage = page && page > 0 ? page : 1;
     const offset = (safePage - 1) * safeLimit;
-    return { limit: safeLimit, offset };
+    return {limit: safeLimit, offset};
   }
 
   /**
@@ -70,6 +77,35 @@ export class DoctorService {
    */
   async addDoctor(payload: CreateDoctorDto) {
     try {
+      const existingDoctor = await this.prisma.doctor_master.findFirst({
+        where: {
+          OR: [
+            {registration_no: payload.doctorRegNo},
+            {hpr_code: payload.hprCode},
+          ],
+        },
+      });
+      if (existingDoctor) {
+        throw new AppException(
+            'A doctor with the same Registration No or HPR Code already exists',
+            400,
+        );
+      }
+
+      // Resolve city_id and state_id from pincode_master
+      let resolvedCityId: string | null = null;
+      let resolvedStateId: string | null = null;
+
+      if (payload.pincodeId) {
+        const pincodeRecord = await this.prisma.pincode_master.findUnique({
+          where: {id: payload.pincodeId},
+          select: {city_id: true, state_id: true},
+        });
+        if (pincodeRecord) {
+          resolvedCityId = pincodeRecord.city_id;
+          resolvedStateId = pincodeRecord.state_id;
+        }
+      }
       return await this.prisma.$transaction(async (tx) => {
         const newDoctor = await tx.doctor_master.create({
           data: {
@@ -87,8 +123,10 @@ export class DoctorService {
             longitude: payload.longitude ?? null,
             created_by: payload.created_by,
             updated_by: payload.updated_by ?? payload.created_by,
+            city_id: resolvedCityId,
+            state_id: resolvedStateId,
           },
-          select: { id: true },
+          select: {id: true},
         });
 
         const qualificationIds = payload.doctorQualificationIds ?? [];
@@ -105,9 +143,12 @@ export class DoctorService {
           });
         }
 
-        return { doctorId: newDoctor.id };
+        return {doctorId: newDoctor.id};
       });
     } catch (error) {
+      if (error instanceof AppException) {
+        throw error;
+      }
       handlePrismaError(error);
     }
   }
@@ -130,6 +171,7 @@ export class DoctorService {
    */
   async updateDoctorById(
       dto: UpdateDoctorRequestDto,
+      dto: UpdateDoctorRequestDto,
   ): Promise<UpdateDoctorResponseDto> {
     const {
       doctorId,
@@ -151,17 +193,19 @@ export class DoctorService {
       // Check for duplicate doctorRegNo or hprCode within hospital
       const existingDoctor = await this.prisma.doctor_master.findFirst({
         where: {
-          OR: [{ registration_no: dto.doctorRegNo }, { hpr_code: dto.hprCode }],
+          OR: [{registration_no: dto.doctorRegNo}, {hpr_code: dto.hprCode}],
         },
       });
       if (existingDoctor?.id) {
         throw new AppException(
             `Doctor with ID ${doctorId} is already exists.`,
             errorCode.DATA_NOT_FOUND,
+            `Doctor with ID ${doctorId} is already exists.`,
+            errorCode.DATA_NOT_FOUND,
         );
       }
       const pincodeMaster = await this.prisma.pincode_master.findUnique({
-        where: { id: pincodeId },
+        where: {id: pincodeId},
       });
       const data = {
         name: doctorName,
@@ -182,9 +226,10 @@ export class DoctorService {
         updated_by: userId ?? '',
       };
       return await this.prisma.$transaction(async (tx) => {
+        // Deactivate the old doctor record
         // Deactivate the old doctor record
         await this.prisma.doctor_master.update({
-          where: { id: doctorId },
+          where: {id: doctorId},
           data: {
             is_active: false,
             updated_by: userId,
@@ -192,7 +237,7 @@ export class DoctorService {
           },
         });
         // @ts-ignore
-        const newDoctor = await tx.doctor_master.create({ data });
+        const newDoctor = await tx.doctor_master.create({data});
         const qualificationIds = doctorQualificationIds ?? [];
         if (Array.isArray(qualificationIds) && qualificationIds.length > 0) {
           const qualificationData = qualificationIds.map((id) => ({
@@ -223,9 +268,10 @@ export class DoctorService {
    */
   async getDoctors(
       listDoctorsRequestDto: ListDoctorsRequestDto,
+      listDoctorsRequestDto: ListDoctorsRequestDto,
   ): Promise<PaginatedDoctorsResponseDto> {
     try {
-      const { doctorName, doctorRegNo, emailId, mobileNo, page, limit } =
+      const {doctorName, doctorRegNo, emailId, mobileNo, page, limit} =
         listDoctorsRequestDto;
 
       const whereCondition: any = {};
@@ -258,30 +304,30 @@ export class DoctorService {
         };
       }
 
-      const { offset: skip, limit: take } = await this.pagination(page, limit);
+      const {offset: skip, limit: take} = await this.pagination(page, limit);
 
       const [doctors, totalCount] = await Promise.all([
         this.prisma.doctor_master.findMany({
           where: whereCondition,
           include: {
             doctor_speciality_master: {
-              select: { id: true, name: true },
+              select: {id: true, name: true},
             },
             qualifications: {
               select: {
                 id: true,
                 qualification: {
-                  select: { id: true, name: true },
+                  select: {id: true, name: true},
                 },
               },
             },
             pincode_master: {
-              select: { id: true, name: true },
+              select: {id: true, name: true},
             },
           },
           skip,
           take,
-          orderBy: { name: 'asc' },
+          orderBy: {name: 'asc'},
         }),
 
         this.prisma.doctor_master.count({
diff --git a/src/doctor/dto/create-doctor.dto.ts b/src/doctor/dto/create-doctor.dto.ts
index dbfae85..cdb9bdc 100644
--- a/src/doctor/dto/create-doctor.dto.ts
+++ b/src/doctor/dto/create-doctor.dto.ts
@@ -25,7 +25,11 @@ export class CreateDoctorDto {
   })
   @IsOptional()
   @IsArray()
+<<<<<<< Updated upstream
   @IsUUID('all', { each: true })
+=======
+  @IsUUID('all', { each: true })
+>>>>>>> Stashed changes
     doctorQualificationIds?: string[];
 
   @ApiProperty({
diff --git a/src/seed.ts b/src/seed.ts
index 6ae4cfa..1bd8858 100644
--- a/src/seed.ts
+++ b/src/seed.ts
@@ -143,7 +143,7 @@ const cityMasterData = [
 ];
 
 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' },
+  {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 regionMasterData = [
@@ -166,14 +166,14 @@ const pincodeData: Array<{
   state_id?: string;
   city_id?: 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', 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'},
 ];
 
 const pincodeForeignKeys: ForeignKeyConfig<typeof pincodeData[0]>[] = [
@@ -485,29 +485,29 @@ const hospitals: Array<{
 ];
 
 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' },
+  {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'},
 ];
 
 
-- 
GitLab


From 40a1c55ccb113cee9f4eabdf9a30ceb58a18c084 Mon Sep 17 00:00:00 2001
From: Manjunath Kumar <manjunath.kumar@niveussolutions.com>
Date: Wed, 18 Jun 2025 16:36:20 +0530
Subject: [PATCH 2/2] duplicate-reg-no-fix-conflict-fix

---
 src/doctor/dto/create-doctor.dto.ts | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/doctor/dto/create-doctor.dto.ts b/src/doctor/dto/create-doctor.dto.ts
index cdb9bdc..dbfae85 100644
--- a/src/doctor/dto/create-doctor.dto.ts
+++ b/src/doctor/dto/create-doctor.dto.ts
@@ -25,11 +25,7 @@ export class CreateDoctorDto {
   })
   @IsOptional()
   @IsArray()
-<<<<<<< Updated upstream
   @IsUUID('all', { each: true })
-=======
-  @IsUUID('all', { each: true })
->>>>>>> Stashed changes
     doctorQualificationIds?: string[];
 
   @ApiProperty({
-- 
GitLab