-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cleanup.sql
1037 lines (718 loc) · 34.9 KB
/
Cleanup.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
DECLARE @ErrorMessage NVARCHAR(4000);
begin try
ALTER INDEX [UK_BillingCounterName_Type]ON BIL_CFG_Counter DISABLE
ALTER INDEX [UK_BIL_CFG_FiscalYears] ON BIL_CFG_FiscalYears DISABLE
ALTER INDEX [UQ__CLN_EyeS__D7A3AA55BC800205] ON CLN_EyeScanImages DISABLE
ALTER INDEX [UQ__CLN_MST___4D3AA1DF8A330DC6] ON CLN_MST_EYE DISABLE
ALTER TABLE ER_Patient DISABLE TRIGGER [Emergency_PoliceCase_NotificatiONTrigger]
ALTER INDEX [UQ__CLN_PAT___D7A3AA5567EF1EDE] ON CLN_PAT_Images DISABLE
ALTER INDEX [UniqueOperatiONName] ON MR_MST_OperatiONType DISABLE
ALTER INDEX [UK_Membership_Community] ON PAT_CFG_MembershipType DISABLE
ALTER INDEX [UQ__PAT_Pati__D7A3AA55F0F539DA] ON PAT_PatientFiles DISABLE
ALTER INDEX [IX_TblPatInsuranceInfo_PatientId] ON PAT_PatientInsuranceInfo DISABLE
ALTER INDEX [UK_PHRM_CFG_FiscalYear] ON PHRM_CFG_FiscalYears DISABLE
ALTER TABLE PHRM_StockTxnItems DISABLE TRIGGER [TR_PHRM_StockTxnItems_MRPUpdateHistory]
ALTER TABLE PHRM_StockTxnItems DISABLE TRIGGER [TR_PHRM_StockTxnItems_UpdateStock]
ALTER TABLE PHRM_TXN_InvoiceItems DISABLE TRIGGER [TRG_PHRM_TXN_InvoiceItems_UpdateGRItemPrice]
ALTER TABLE LAB_TestRequisition DISABLE TRIGGER [PRINT_UpdateTrigger]
ALTER INDEX [IX_TblBilDeposit_VisitId] ON BIL_TXN_Deposit DISABLE
ALTER INDEX [IX_TblPatientBedInfo_VisitId] ON ADT_TXN_PatientBedInfo DISABLE
ALTER INDEX [IX_BIL_BillingTransaction_CreatedOn] ON BIL_TXN_BillingTransaction DISABLE
ALTER INDEX [IX_TblBilTxn_FiscalYearId_InvoiceNo] ON BIL_TXN_BillingTransaction DISABLE
ALTER TABLE BIL_TXN_BillingTransaction DISABLE TRIGGER [TRG_BillingTransaction_RestrictBillAlter]
ALTER INDEX [IX_TblVisit_HasInsurance_VisitDate] ON PAT_PatientVisits DISABLE
ALTER INDEX [IX_TblVisit_PatientId] ON PAT_PatientVisits DISABLE
ALTER INDEX [IX_TblVisits_ClaimCode] ON PAT_PatientVisits DISABLE
ALTER TABLE PAT_PatientVisits DISABLE TRIGGER [PAT_PatientVisits_NotificationTrigger]
ALTER INDEX [IX_INCTV_TXN_IncentiveFractionItem_BillingTransactionItemId] ON INCTV_TXN_IncentiveFractionItem DISABLE
ALTER INDEX [IX_INCTV_TXN_IncentiveFractionItem_IncentiveReceiverId] ON INCTV_TXN_IncentiveFractionItem DISABLE
ALTER INDEX [UK_IncentiveFractionItems] ON INCTV_TXN_IncentiveFractionItem DISABLE
ALTER TABLE BIL_SYNC_BillingAccounting DISABLE TRIGGER [TRG_BillToAcc_BillSync]
ALTER INDEX [IX_TblAdmission_IsInsurancePatient] ON ADT_PatientAdmission DISABLE
ALTER INDEX [IX_TblAdmission_VisitId_PatientId] ON ADT_PatientAdmission DISABLE
delete from dbo.__MigrationHistory
delete from ACC_Bill_LedgerMapping
DBCC CHECKIDENT ('ACC_Bill_LedgerMapping', RESEED, 0);
delete from ACC_FiscalYear_Log
DBCC CHECKIDENT ('ACC_FiscalYear_Log', RESEED, 0);
delete from ACC_InvoiceData
DBCC CHECKIDENT ('ACC_InvoiceData', RESEED, 0);
delete from ACC_LedgerBalanceHistory
DBCC CHECKIDENT ('ACC_LedgerBalanceHistory', RESEED, 0);
delete from ACC_Log_EditVoucher
DBCC CHECKIDENT ('ACC_Log_EditVoucher', RESEED, 0);
delete from ACC_Map_TxnItemCostCenterItem
DBCC CHECKIDENT ('ACC_Map_TxnItemCostCenterItem', RESEED, 0);
delete from ACC_ReverseTransaction
DBCC CHECKIDENT ('ACC_ReverseTransaction', RESEED, 0);
delete from ACC_Transaction_History
DBCC CHECKIDENT ('ACC_Transaction_History', RESEED, 0);
delete from ACC_TransactionItemDetail
DBCC CHECKIDENT ('ACC_TransactionItemDetail', RESEED, 0);
delete from ACC_TXN_Link
DBCC CHECKIDENT ('ACC_TXN_Link', RESEED, 0);
delete from ACC_TransactionItems
DBCC CHECKIDENT ('ACC_TransactionItems', RESEED, 0);
delete from ACC_MST_CodeDetails
DBCC CHECKIDENT ('ACC_MST_CodeDetails', RESEED, 0);
--delete from ACC_MST_ChartOfAccounts
--DBCC CHECKIDENT ('ACC_MST_ChartOfAccounts', RESEED, 0);
delete from ACC_Transactions
DBCC CHECKIDENT ('ACC_Transactions', RESEED, 0);
delete from ACC_TXN_Bank_Reconciliation
DBCC CHECKIDENT ('ACC_TXN_Bank_Reconciliation', RESEED, 0);
delete from ACC_TXN_Payment
DBCC CHECKIDENT ('ACC_TXN_Payment', RESEED, 0);
delete from ADT_BabyBirthDetails
DBCC CHECKIDENT ('ADT_BabyBirthDetails', RESEED, 0);
delete from ADT_BedReservation
DBCC CHECKIDENT ('ADT_BedReservation', RESEED, 0);
delete from ADT_DeathDeatils
DBCC CHECKIDENT ('ADT_DeathDeatils', RESEED, 0);
delete from ADT_DischargeCancel
DBCC CHECKIDENT ('ADT_DischargeCancel', RESEED, 0);
delete from ADT_DischargeSummary
DBCC CHECKIDENT ('ADT_DischargeSummary', RESEED, 0);
delete from ADT_DischargeSummaryMedication
DBCC CHECKIDENT ('ADT_DischargeSummaryMedication', RESEED, 0);
delete from ADT_MAP_BedFeaturesMap
DBCC CHECKIDENT ('ADT_MAP_BedFeaturesMap', RESEED, 0);
delete from ADT_PatientCertificate
DBCC CHECKIDENT ('ADT_PatientCertificate', RESEED, 0)
delete from BedInformationModels
DBCC CHECKIDENT ('BedInformationModels', RESEED, 0);
delete from BIL_BillItemRequisition
DBCC CHECKIDENT ('BIL_BillItemRequisition', RESEED, 0);
delete from BIL_CFG_BillItemPrice
DBCC CHECKIDENT ('BIL_CFG_BillItemPrice', RESEED, 0);
delete from BIL_CFG_BillItemPrice_History
DBCC CHECKIDENT ('BIL_CFG_BillItemPrice_History', RESEED, 0);
delete from LAB_TXN_TestComponentResult
DBCC CHECKIDENT ('LAB_TXN_TestComponentResult', RESEED, 0);
delete from LAB_TestRequisition
DBCC CHECKIDENT ('LAB_TestRequisition', RESEED, 0);
delete from RAD_PatientImagingReport
DBCC CHECKIDENT ('RAD_PatientImagingReport', RESEED, 0);
delete from RAD_PatientImagingRequisition
DBCC CHECKIDENT ('RAD_PatientImagingRequisition', RESEED, 0);
delete from BIL_TXN_BillingTransactionItems
DBCC CHECKIDENT ('BIL_TXN_BillingTransactionItems', RESEED, 0);
delete from BIL_TXN_CreditBillStatus
DBCC CHECKIDENT ('BIL_TXN_CreditBillStatus', RESEED, 0);
delete from BIL_TXN_BillingTransaction
DBCC CHECKIDENT ('BIL_TXN_BillingTransaction', RESEED, 0);
delete from BIL_TXN_SchemeRefund
DBCC CHECKIDENT ('BIL_TXN_SchemeRefund', RESEED, 0);
delete from BIL_TXN_CashHandover
DBCC CHECKIDENT ('BIL_TXN_CashHandover', RESEED, 0);
delete from BIL_CFG_Counter
DBCC CHECKIDENT ('BIL_CFG_Counter', RESEED, 0);
delete from PHRM_TXN_CreditBillStatus
DBCC CHECKIDENT ('PHRM_TXN_CreditBillStatus', RESEED, 0);
delete from BIL_TXN_DischargeStatement
DBCC CHECKIDENT ('BIL_TXN_DischargeStatement', RESEED, 0);
delete from BIL_CFG_FiscalYears
DBCC CHECKIDENT ('BIL_CFG_FiscalYears', RESEED, 0);
delete from BIL_CFG_Packages
DBCC CHECKIDENT ('BIL_CFG_Packages', RESEED, 0);
delete from PAT_MAP_PatientSchemes
DBCC CHECKIDENT ('PAT_MAP_PatientSchemes', RESEED, 0);
delete from ADT_PatientAdmission
DBCC CHECKIDENT ('ADT_PatientAdmission', RESEED, 0);
delete from PHRM_TXN_InvoiceItems
DBCC CHECKIDENT ('PHRM_TXN_InvoiceItems', RESEED, 0);
delete from PHRM_TXN_Invoice
DBCC CHECKIDENT ('PHRM_TXN_Invoice', RESEED, 0);
delete from MR_TXN_Outpatient_FinalDiagnosis
DBCC CHECKIDENT ('MR_TXN_Outpatient_FinalDiagnosis', RESEED, 0);
delete from ADT_TXN_PatientBedInfo
DBCC CHECKIDENT ('ADT_TXN_PatientBedInfo', RESEED, 0);
delete from PAT_PatientVisits
DBCC CHECKIDENT ('PAT_PatientVisits', RESEED, 0);
delete from BIL_MAP_ServiceItemSchemeSetting
DBCC CHECKIDENT ('BIL_MAP_ServiceItemSchemeSetting', RESEED, 0);
delete from ADT_CFG_AutoBillingItem
where ADT_CFG_AutoBillingItem.AdtAutoBillingItemId>0
DBCC CHECKIDENT ('ADT_CFG_AutoBillingItem', RESEED, 0);
delete from ADT_CFG_DepositSettings
DBCC CHECKIDENT ('ADT_CFG_DepositSettings', RESEED, 0);
delete from ADT_MAP_BedFeatureSchemePriceCategory
DBCC CHECKIDENT ('ADT_MAP_BedFeatureSchemePriceCategory', RESEED, 0);
delete from BIL_MAP_PriceCategoryVsScheme
DBCC CHECKIDENT ('BIL_MAP_PriceCategoryVsScheme', RESEED, 0);
delete from BIL_CFG_Scheme
DBCC CHECKIDENT ('BIL_CFG_Scheme', RESEED, 0);
delete from BIL_MAP_PriceCategoryServiceItem
DBCC CHECKIDENT ('BIL_MAP_PriceCategoryServiceItem', RESEED, 0);
delete from BIL_CFG_PriceCategory
DBCC CHECKIDENT ('BIL_CFG_PriceCategory', RESEED, 0);
delete from BIL_History_BillingTransactionItems
DBCC CHECKIDENT ('BIL_History_BillingTransactionItems', RESEED, 0);
delete from BIL_TXN_Settlements
DBCC CHECKIDENT ('BIL_TXN_Settlements', RESEED, 0);
delete from CLN_ActiveMedicals
DBCC CHECKIDENT ('CLN_ActiveMedicals', RESEED, 0);
delete from CLN_Allergies
DBCC CHECKIDENT ('CLN_Allergies', RESEED, 0);
delete from CLN_Diagnosis
DBCC CHECKIDENT ('CLN_Diagnosis', RESEED, 0);
delete from CLN_EYE_Ablation_Profile
DBCC CHECKIDENT ('CLN_EYE_Ablation_Profile', RESEED, 0);
delete from CLN_EYE_Laser_DataEntry
DBCC CHECKIDENT ('CLN_EYE_Laser_DataEntry', RESEED, 0);
delete from CLN_EYE_LasikRST
DBCC CHECKIDENT ('CLN_EYE_LasikRST', RESEED, 0);
delete from CLN_EYE_OperationNotes
DBCC CHECKIDENT ('CLN_EYE_OperationNotes', RESEED, 0);
delete from CLN_EYE_ORA
DBCC CHECKIDENT ('CLN_EYE_ORA', RESEED, 0);
delete from CLN_EYE_Pachymetry
DBCC CHECKIDENT ('CLN_EYE_Pachymetry', RESEED, 0);
delete from CLN_EYE_PreOP_Pachymetry
DBCC CHECKIDENT ('CLN_EYE_PreOP_Pachymetry', RESEED, 0);
delete from CLN_EYE_Refraction
DBCC CHECKIDENT ('CLN_EYE_Refraction', RESEED, 0);
delete from CLN_EYE_Smile_Incisions
DBCC CHECKIDENT ('CLN_EYE_Smile_Incisions', RESEED, 0);
delete from CLN_EYE_Smile_Setting
DBCC CHECKIDENT ('CLN_EYE_Smile_Setting', RESEED, 0);
delete from CLN_EYE_VisuMax
DBCC CHECKIDENT ('CLN_EYE_VisuMax', RESEED, 0);
delete from CLN_EYE_Wavefront
DBCC CHECKIDENT ('CLN_EYE_Wavefront', RESEED, 0);
delete from CLN_EyeScanImages
DBCC CHECKIDENT ('CLN_EyeScanImages', RESEED, 0);
delete from CLN_FamilyHistory
DBCC CHECKIDENT ('CLN_FamilyHistory', RESEED, 0);
delete from CLN_HomeMedications
DBCC CHECKIDENT ('CLN_HomeMedications', RESEED, 0);
delete from CLN_KV_PatientClinical_Info
DBCC CHECKIDENT ('CLN_KV_PatientClinical_Info', RESEED, 0);
delete from CLN_MedicationPrescription
DBCC CHECKIDENT ('CLN_MedicationPrescription', RESEED, 0);
delete from CLN_MST_EYE
DBCC CHECKIDENT ('CLN_MST_EYE', RESEED, 0);
delete from CLN_MST_PrescriptionSlip
DBCC CHECKIDENT ('CLN_MST_PrescriptionSlip', RESEED, 0);
delete from CLN_Notes_Emergency
DBCC CHECKIDENT ('CLN_Notes_Emergency', RESEED, 0);
delete from CLN_Notes_FreeText
DBCC CHECKIDENT ('CLN_Notes_FreeText', RESEED, 0);
delete from CLN_Notes_Objective
DBCC CHECKIDENT ('CLN_Notes_Objective', RESEED, 0);
delete from CLN_Notes_PrescriptionNote
DBCC CHECKIDENT ('CLN_Notes_PrescriptionNote', RESEED, 0);
delete from CLN_Notes_Procedure
DBCC CHECKIDENT ('CLN_Notes_Procedure', RESEED, 0);
delete from CLN_Notes_Progress
DBCC CHECKIDENT ('CLN_Notes_Progress', RESEED, 0);
delete from CLN_Notes_Subjective
DBCC CHECKIDENT ('CLN_Notes_Subjective', RESEED, 0);
delete from CLN_PastMedicals
DBCC CHECKIDENT ('CLN_PastMedicals', RESEED, 0);
delete from CLN_PAT_Images
DBCC CHECKIDENT ('CLN_PAT_Images', RESEED, 0);
delete from CLN_PatientNotes
DBCC CHECKIDENT ('CLN_PatientNotes', RESEED, 0);
delete from CLN_PrescriptionSlip_Acceptance
DBCC CHECKIDENT ('CLN_PrescriptionSlip_Acceptance', RESEED, 0);
delete from CLN_PrescriptionSlip_AdviceDiagnosis
DBCC CHECKIDENT ('CLN_PrescriptionSlip_AdviceDiagnosis', RESEED, 0);
delete from CLN_PrescriptionSlip_Dilate
DBCC CHECKIDENT ('CLN_PrescriptionSlip_Dilate', RESEED, 0);
delete from CLN_PrescriptionSlip_FinalClass
DBCC CHECKIDENT ('CLN_PrescriptionSlip_FinalClass', RESEED, 0);
delete from CLN_PrescriptionSlip_History
DBCC CHECKIDENT ('CLN_PrescriptionSlip_History', RESEED, 0);
delete from CLN_PrescriptionSlip_IOP
DBCC CHECKIDENT ('CLN_PrescriptionSlip_IOP', RESEED, 0);
delete from CLN_PrescriptionSlip_Plup
DBCC CHECKIDENT ('CLN_PrescriptionSlip_Plup', RESEED, 0);
delete from CLN_PrescriptionSlip_Retinoscopy
DBCC CHECKIDENT ('CLN_PrescriptionSlip_Retinoscopy', RESEED, 0);
delete from CLN_PrescriptionSlip_TBUT
DBCC CHECKIDENT ('CLN_PrescriptionSlip_TBUT', RESEED, 0);
delete from CLN_PrescriptionSlip_VaUnaided
DBCC CHECKIDENT ('CLN_PrescriptionSlip_VaUnaided', RESEED, 0);
delete from CLN_ReferralSource
DBCC CHECKIDENT ('CLN_ReferralSource', RESEED, 0);
delete from CLN_SocialHistory
DBCC CHECKIDENT ('CLN_SocialHistory', RESEED, 0);
delete from CORE_Notification
DBCC CHECKIDENT ('CORE_Notification', RESEED, 0);
delete from CSSD_TXN_ItemTransaction
DBCC CHECKIDENT ('CSSD_TXN_ItemTransaction', RESEED, 0);
delete from CLN_SurgicalHistory
DBCC CHECKIDENT ('CLN_SurgicalHistory', RESEED, 0);
delete from DanpheAudit
DBCC CHECKIDENT ('DanpheAudit', RESEED, 0);
delete from DanpheLogInInformation
DBCC CHECKIDENT ('DanpheLogInInformation', RESEED, 0);
delete from DOC_TXN_VisitSummary
DBCC CHECKIDENT ('DOC_TXN_VisitSummary', RESEED, 0);
delete from EMP_EmployeePreferences
DBCC CHECKIDENT ('EMP_EmployeePreferences', RESEED, 0);
delete from ER_DischargeSummary
DBCC CHECKIDENT ('ER_DischargeSummary', RESEED, 0);
delete from ER_FileUploads
DBCC CHECKIDENT ('ER_FileUploads', RESEED, 0);
delete from ER_ModeOfArrival
DBCC CHECKIDENT ('ER_ModeOfArrival', RESEED, 0);
delete from ER_Patient
DBCC CHECKIDENT ('ER_Patient', RESEED, 0);
delete from ER_Patient_Cases
DBCC CHECKIDENT ('ER_Patient_Cases', RESEED, 0);
delete from FRC_FractionCalculation
DBCC CHECKIDENT ('FRC_FractionCalculation', RESEED, 0);
delete from INCTV_TXN_PaymentInfo
DBCC CHECKIDENT ('INCTV_TXN_PaymentInfo', RESEED, 0);
delete from INS_InsuranceBalanceAmount_History
DBCC CHECKIDENT ('INS_InsuranceBalanceAmount_History', RESEED, 0);
delete from INS_TXN_PatientInsurancePackages
DBCC CHECKIDENT ('INS_TXN_PatientInsurancePackages', RESEED, 0);
delete from INV_AssetConditionCheckList
DBCC CHECKIDENT ('INV_AssetConditionCheckList', RESEED, 0);
delete from INV_AssetFaultHistory
DBCC CHECKIDENT ('INV_AssetFaultHistory', RESEED, 0);
delete from INV_AssetInsurance
DBCC CHECKIDENT ('INV_AssetInsurance', RESEED, 0);
delete from INV_AssetLocationHistory
DBCC CHECKIDENT ('INV_AssetLocationHistory', RESEED, 0);
delete from INV_AssetServiceHistory
DBCC CHECKIDENT ('INV_AssetServiceHistory', RESEED, 0);
delete from INV_AssetServiceHistory
DBCC CHECKIDENT ('INV_AssetServiceHistory', RESEED, 0);
delete from INV_MST_Donation
DBCC CHECKIDENT ('INV_MST_Donation', RESEED, 0);
delete from INV_TXN_StockTransaction
DBCC CHECKIDENT ('INV_TXN_StockTransaction', RESEED, 0);
delete from INV_TXN_StoreStock
DBCC CHECKIDENT ('INV_TXN_StoreStock', RESEED, 0);
delete from INV_MST_Stock
DBCC CHECKIDENT ('INV_MST_Stock', RESEED, 0);
delete from INV_TXN_GoodsReceiptItems
DBCC CHECKIDENT ('INV_TXN_GoodsReceiptItems', RESEED, 0);
delete from INV_TXN_GoodsReceipt
DBCC CHECKIDENT ('INV_TXN_GoodsReceipt', RESEED, 0);
delete from INV_TXN_PurchaseOrderItems
DBCC CHECKIDENT ('INV_TXN_PurchaseOrderItems', RESEED, 0);
delete from INV_TXN_PurchaseOrder
DBCC CHECKIDENT ('INV_TXN_PurchaseOrder', RESEED, 0);
delete from INV_RequestForQuotationVendors
DBCC CHECKIDENT ('INV_RequestForQuotationVendors', RESEED, 0);
delete from INV_MST_Vendor
DBCC CHECKIDENT ('INV_MST_Vendor', RESEED, 0);
delete from INV_Quotation
DBCC CHECKIDENT ('INV_Quotation', RESEED, 0);
delete from INV_QuotationItems
DBCC CHECKIDENT ('INV_QuotationItems', RESEED, 0);
delete from INV_QuotationUploadedFiles
DBCC CHECKIDENT ('INV_QuotationUploadedFiles', RESEED, 0);
delete from INV_RequestForQuotation
DBCC CHECKIDENT ('INV_RequestForQuotation', RESEED, 0);
delete from INV_RequestForQuotationItems
DBCC CHECKIDENT ('INV_RequestForQuotationItems', RESEED, 0);
delete from INV_TXN_AssetDepreciation
DBCC CHECKIDENT ('INV_TXN_AssetDepreciation', RESEED, 0);
delete from INV_TXN_FixedAssetDispatch
DBCC CHECKIDENT ('INV_TXN_FixedAssetDispatch', RESEED, 0);
delete from INV_TXN_FixedAssetDispatchItems
DBCC CHECKIDENT ('INV_TXN_FixedAssetDispatchItems', RESEED, 0);
delete from INV_TXN_FixedAssetRequisition
DBCC CHECKIDENT ('INV_TXN_FixedAssetRequisition', RESEED, 0);
delete from INV_TXN_FixedAssetRequisitionItems
DBCC CHECKIDENT ('INV_TXN_FixedAssetRequisitionItems', RESEED, 0);
delete from INV_TXN_FixedAssetReturn
DBCC CHECKIDENT ('INV_TXN_FixedAssetReturn', RESEED, 0);
delete from INV_TXN_FixedAssetReturnItems
DBCC CHECKIDENT ('INV_TXN_FixedAssetReturnItems', RESEED, 0);
delete from INV_TXN_FixedAssetStock
DBCC CHECKIDENT ('INV_TXN_FixedAssetStock', RESEED, 0);
delete from INV_TXN_PurchaseRequestItems
DBCC CHECKIDENT ('INV_TXN_PurchaseRequestItems', RESEED, 0);
delete from INV_TXN_PurchaseRequest
DBCC CHECKIDENT ('INV_TXN_PurchaseRequest', RESEED, 0);
delete from INV_TXN_ReturnToVendor
DBCC CHECKIDENT ('INV_TXN_ReturnToVendor', RESEED, 0);
delete from INV_TXN_ReturnToVendorItems
DBCC CHECKIDENT ('INV_TXN_ReturnToVendorItems', RESEED, 0);
delete from INV_TXN_WriteOffItems
DBCC CHECKIDENT ('INV_TXN_WriteOffItems', RESEED, 0);
delete from IRD_Log
DBCC CHECKIDENT ('IRD_Log', RESEED, 0);
delete from MAT_FileUploads
DBCC CHECKIDENT ('MAT_FileUploads', RESEED, 0);
delete from MAT_MaternityANC
DBCC CHECKIDENT ('MAT_MaternityANC', RESEED, 0);
delete from MAT_Patient
DBCC CHECKIDENT ('MAT_Patient', RESEED, 0);
delete from MAT_Register
DBCC CHECKIDENT ('MAT_Register', RESEED, 0);
delete from MAT_TXN_PatientPayments
DBCC CHECKIDENT ('MAT_TXN_PatientPayments', RESEED, 0);
delete from MR_MST_OperationType
DBCC CHECKIDENT ('MR_MST_OperationType', RESEED, 0);
delete from MR_RecordSummary
DBCC CHECKIDENT ('MR_RecordSummary', RESEED, 0);
delete from MR_TXN_Inpatient_Diagnosis
DBCC CHECKIDENT ('MR_TXN_Inpatient_Diagnosis', RESEED, 0);
delete from OT_TXN_OtTeamsInfo
DBCC CHECKIDENT ('OT_TXN_OtTeamsInfo', RESEED, 0);
delete from OT_TXN_BookingDetails
DBCC CHECKIDENT ('OT_TXN_BookingDetails', RESEED, 0);
delete from OT_TXN_CheckListInfo
DBCC CHECKIDENT ('OT_TXN_CheckListInfo', RESEED, 0);
delete from OT_TXN_Summary
DBCC CHECKIDENT ('OT_TXN_Summary', RESEED, 0);
delete from PAT_Appointment
DBCC CHECKIDENT ('PAT_Appointment', RESEED, 0);
delete from PAT_CFG_MembershipType
DBCC CHECKIDENT ('PAT_CFG_MembershipType', RESEED, 0);
delete from PAT_HealthCardInfo
DBCC CHECKIDENT ('PAT_HealthCardInfo', RESEED, 0);
delete from PAT_PatientAddress
DBCC CHECKIDENT ('PAT_PatientAddress', RESEED, 0);
delete from PAT_PatientFiles
DBCC CHECKIDENT ('PAT_PatientFiles', RESEED, 0);
delete from PAT_PatientInsuranceInfo
DBCC CHECKIDENT ('PAT_PatientInsuranceInfo', RESEED, 0);
delete from PAT_PatientKinOrEmergencyContacts
DBCC CHECKIDENT ('PAT_PatientKinOrEmergencyContacts', RESEED, 0);
delete from PAT_SSU_Information
DBCC CHECKIDENT ('PAT_SSU_Information', RESEED, 0);
delete from PHRM_BIL_Transaction
DBCC CHECKIDENT ('PHRM_BIL_Transaction', RESEED, 0);
delete from PHRM_BIL_TransactionItem
DBCC CHECKIDENT ('PHRM_BIL_TransactionItem', RESEED, 0);
delete from PHRM_EmployeeCashTransaction
DBCC CHECKIDENT ('PHRM_EmployeeCashTransaction', RESEED, 0);
delete from PHRM_TXN_StockTransaction
DBCC CHECKIDENT ('PHRM_TXN_StockTransaction', RESEED, 0);
delete from PHRM_StoreDispatchItems
DBCC CHECKIDENT ('PHRM_StoreDispatchItems', RESEED, 0);
delete from PHRM_StoreRequisitionItems
DBCC CHECKIDENT ('PHRM_StoreRequisitionItems', RESEED, 0);
delete from PHRM_StoreRequisition
DBCC CHECKIDENT ('PHRM_StoreRequisition', RESEED, 0);
delete from PHRM_PurchaseOrderItems
DBCC CHECKIDENT ('PHRM_PurchaseOrderItems', RESEED, 0);
delete from PHRM_GoodsReceiptItems
DBCC CHECKIDENT ('PHRM_GoodsReceiptItems', RESEED, 0);
delete from PHRM_GoodsReceipt
DBCC CHECKIDENT ('PHRM_GoodsReceipt', RESEED, 0);
delete from PHRM_PurchaseOrder
DBCC CHECKIDENT ('PHRM_PurchaseOrder', RESEED, 0);
delete from PHRM_FiscalYearStock
DBCC CHECKIDENT ('PHRM_FiscalYearStock', RESEED, 0);
delete from PHRM_CFG_FiscalYears
DBCC CHECKIDENT ('PHRM_CFG_FiscalYears', RESEED, 0);
delete from PHRM_Deposit
DBCC CHECKIDENT ('PHRM_Deposit', RESEED, 0);
delete from PHRM_ExpiryDate_BatchNo_History
DBCC CHECKIDENT ('PHRM_ExpiryDate_BatchNo_History', RESEED, 0);
delete from PHRM_History_Item
DBCC CHECKIDENT ('PHRM_History_Item', RESEED, 0);
delete from PHRM_History_StockBatchExpiry
DBCC CHECKIDENT ('PHRM_History_StockBatchExpiry', RESEED, 0);
delete from PHRM_History_StockMRP
DBCC CHECKIDENT ('PHRM_History_StockMRP', RESEED, 0);
delete from PHRM_NarcoticSaleRecord
DBCC CHECKIDENT ('PHRM_NarcoticSaleRecord', RESEED, 0);
delete from PHRM_Prescription
DBCC CHECKIDENT ('PHRM_Prescription', RESEED, 0);
delete from PHRM_PrescriptionItems
DBCC CHECKIDENT ('PHRM_PrescriptionItems', RESEED, 0);
delete from PHRM_Requisition
DBCC CHECKIDENT ('PHRM_Requisition', RESEED, 0);
delete from PHRM_RequisitionItems
DBCC CHECKIDENT ('PHRM_RequisitionItems', RESEED, 0);
delete from PHRM_ReturnToSupplier
DBCC CHECKIDENT ('PHRM_ReturnToSupplier', RESEED, 0);
delete from PHRM_ReturnToSupplierItems
DBCC CHECKIDENT ('PHRM_ReturnToSupplierItems', RESEED, 0);
delete from PHRM_SaleItems
DBCC CHECKIDENT ('PHRM_SaleItems', RESEED, 0);
delete from PHRM_SaleItemsReturn
DBCC CHECKIDENT ('PHRM_SaleItemsReturn', RESEED, 0);
delete from PHRM_Stock
DBCC CHECKIDENT ('PHRM_Stock', RESEED, 0);
delete from PHRM_StockManage
DBCC CHECKIDENT ('PHRM_StockManage', RESEED, 0);
delete from PHRM_StockTxnItems
DBCC CHECKIDENT ('PHRM_StockTxnItems', RESEED, 0);
delete from PHRM_StockTxnItems_MRPHistory
DBCC CHECKIDENT ('PHRM_StockTxnItems_MRPHistory', RESEED, 0);
delete from PHRM_TXN_DispensaryStock
DBCC CHECKIDENT ('PHRM_TXN_DispensaryStock', RESEED, 0);
delete from PHRM_TXN_DispensaryStockTransaction
DBCC CHECKIDENT ('PHRM_TXN_DispensaryStockTransaction', RESEED, 0);
delete from PHRM_TXN_Invoice
DBCC CHECKIDENT ('PHRM_TXN_Invoice', RESEED, 0);
delete from PHRM_TXN_InvoiceReturn
DBCC CHECKIDENT ('PHRM_TXN_InvoiceReturn', RESEED, 0);
delete from PHRM_TXN_InvoiceReturnItems
DBCC CHECKIDENT ('PHRM_TXN_InvoiceReturnItems', RESEED, 0);
delete from PHRM_TXN_Settlement
DBCC CHECKIDENT ('PHRM_TXN_Settlement', RESEED, 0);
delete from PHRM_TXN_Stock
DBCC CHECKIDENT ('PHRM_TXN_Stock', RESEED, 0);
delete from PHRM_TXN_StoreStock
DBCC CHECKIDENT ('PHRM_TXN_StoreStock', RESEED, 0);
delete from PHRM_TXN_SupplierLedger
DBCC CHECKIDENT ('PHRM_TXN_SupplierLedger', RESEED, 0);
delete from PHRM_TXN_SupplierLedgerTransaction
DBCC CHECKIDENT ('PHRM_TXN_SupplierLedgerTransaction', RESEED, 0);
delete from PHRM_WriteOff
DBCC CHECKIDENT ('PHRM_WriteOff', RESEED, 0);
delete from PHRM_WriteOffItems
DBCC CHECKIDENT ('PHRM_WriteOffItems', RESEED, 0);
delete from PROLL_AttendanceDailyTimeRecord
DBCC CHECKIDENT ('PROLL_AttendanceDailyTimeRecord', RESEED, 0);
delete from PROLL_DailyMuster
DBCC CHECKIDENT ('PROLL_DailyMuster', RESEED, 0);
delete from PROLL_EmpLeave
DBCC CHECKIDENT ('PROLL_EmpLeave', RESEED, 0);
delete from SCH_EmpDayWiseAvailability
delete from SCH_EmployeeSchedules
DBCC CHECKIDENT ('SCH_EmployeeSchedules', RESEED, 0);
delete from SCH_MAP_EmployeeShift
DBCC CHECKIDENT ('SCH_MAP_EmployeeShift', RESEED, 0);
delete from TXN_EmpDueAmount
DBCC CHECKIDENT ('TXN_EmpDueAmount', RESEED, 0);
delete from TXN_Sms
DBCC CHECKIDENT ('TXN_Sms', RESEED, 0);
delete from INV_TXN_Dispatch
DBCC CHECKIDENT ('INV_TXN_Dispatch', RESEED, 0);
delete from INV_TXN_DispatchItems
DBCC CHECKIDENT ('INV_TXN_DispatchItems', RESEED, 0);
delete from INV_TXN_RequisitionItems
DBCC CHECKIDENT ('INV_TXN_RequisitionItems', RESEED, 0);
delete from INV_TXN_Requisition
DBCC CHECKIDENT ('INV_TXN_Requisition', RESEED, 0);
delete from TXN_Verification
DBCC CHECKIDENT ('TXN_Verification', RESEED, 0);
delete from WardInformationModels
delete from WARD_Transaction
DBCC CHECKIDENT ('WARD_Transaction', RESEED, 0);
delete from WARD_Stock
DBCC CHECKIDENT ('WARD_Stock', RESEED, 0);
delete from WARD_RequisitionItems
DBCC CHECKIDENT ('WARD_RequisitionItems', RESEED, 0);
delete from WARD_Requisition
DBCC CHECKIDENT ('WARD_Requisition', RESEED, 0);
delete from WARD_INV_ConsumptionReceipt
DBCC CHECKIDENT ('WARD_INV_ConsumptionReceipt', RESEED, 0);
delete from WARD_InternalConsumptionItems
DBCC CHECKIDENT ('WARD_InternalConsumptionItems', RESEED, 0);
delete from WARD_InternalConsumption
DBCC CHECKIDENT ('WARD_InternalConsumption', RESEED, 0);
delete from WARD_DispatchItems
DBCC CHECKIDENT ('WARD_DispatchItems', RESEED, 0);
delete from WARD_Dispatch
DBCC CHECKIDENT ('WARD_Dispatch', RESEED, 0);
delete from WARD_Consumption
DBCC CHECKIDENT ('WARD_Consumption', RESEED, 0);
delete from VACC_Vaccines
DBCC CHECKIDENT ('VACC_Vaccines', RESEED, 0);
delete from VACC_PatientVaccineDetail
DBCC CHECKIDENT ('VACC_PatientVaccineDetail', RESEED, 0);
delete from PHRM_StoreStock
DBCC CHECKIDENT ('PHRM_StoreStock', RESEED, 0);
delete from LAB_TXN_LabReports
DBCC CHECKIDENT ('LAB_TXN_LabReports', RESEED, 0);
delete from LAB_BarCode
DBCC CHECKIDENT ('LAB_BarCode', RESEED, 0);
delete from Lab_Mst_Gov_Report_Items
DBCC CHECKIDENT ('Lab_Mst_Gov_Report_Items', RESEED, 0);
delete from PAT_PatientGurantorInfo
DBCC CHECKIDENT ('PAT_PatientGurantorInfo', RESEED, 0);
delete from PAT_PatientMembership
DBCC CHECKIDENT ('PAT_PatientMembership', RESEED, 0);
delete from BIL_CFG_Counter
DBCC CHECKIDENT ('BIL_CFG_Counter', RESEED, 0);
delete from BIL_TXN_InvoiceReturnItems
DBCC CHECKIDENT ('BIL_TXN_InvoiceReturnItems', RESEED, 0);
delete from BIL_TXN_InvoiceReturn
DBCC CHECKIDENT ('BIL_TXN_InvoiceReturn', RESEED, 0);
delete from BIL_TXN_Deposit
DBCC CHECKIDENT ('BIL_TXN_Deposit', RESEED, 0);
delete from TXN_EmpCashTransaction
DBCC CHECKIDENT ('TXN_EmpCashTransaction', RESEED, 0);
delete from CLN_KV_PatientClinical_Info
DBCC CHECKIDENT ('CLN_KV_PatientClinical_Info', RESEED, 0);
delete from ACC_Ledger_Mapping
DBCC CHECKIDENT ('ACC_Ledger_Mapping', RESEED, 0);
delete from RAD_PatientImagingReport
DBCC CHECKIDENT ('RAD_PatientImagingReport', RESEED, 0);
delete from RAD_PatientImagingRequisition
DBCC CHECKIDENT ('RAD_PatientImagingRequisition', RESEED, 0);
delete from ADT_PatientAdmission
DBCC CHECKIDENT ('ADT_PatientAdmission', RESEED, 0);
delete from CLN_InputOutput
DBCC CHECKIDENT ('CLN_InputOutput', RESEED, 0);
delete from CLN_PatientVitals
DBCC CHECKIDENT ('CLN_PatientVitals', RESEED, 0);
delete from CLN_Notes
DBCC CHECKIDENT ('CLN_Notes', RESEED, 0);
delete from INCTV_TXN_IncentiveFractionItem
DBCC CHECKIDENT ('INCTV_TXN_IncentiveFractionItem', RESEED, 0);
delete from TXN_PrintInformation
DBCC CHECKIDENT ('TXN_PrintInformation', RESEED, 0);
delete from BIL_SYNC_BillingAccounting
DBCC CHECKIDENT ('BIL_SYNC_BillingAccounting', RESEED, 0);
delete from PHRM_DispensaryStock
DBCC CHECKIDENT ('PHRM_DispensaryStock', RESEED, 0);
delete from INV_FiscalYearStock
DBCC CHECKIDENT ('INV_FiscalYearStock', RESEED, 0);
delete from WARD_INV_Transaction
DBCC CHECKIDENT ('WARD_INV_Transaction', RESEED, 0);
delete from WARD_INV_Stock
DBCC CHECKIDENT ('WARD_INV_Stock', RESEED, 0);
delete from WARD_INV_Consumption
DBCC CHECKIDENT ('WARD_INV_Consumption', RESEED, 0);
delete from INV_TXN_Stock
DBCC CHECKIDENT ('INV_TXN_Stock', RESEED, 0);
delete from PAT_NeighbourhoodCardDetail
DBCC CHECKIDENT ('PAT_NeighbourhoodCardDetail', RESEED, 0);
delete from INS_TXN_ClaimPayment
DBCC CHECKIDENT ('INS_TXN_ClaimPayment', RESEED, 0);
delete from INS_TXN_InsuranceClaim
DBCC CHECKIDENT ('INS_TXN_InsuranceClaim', RESEED, 0);
delete from PAT_Patient where PatientId>0
DBCC CHECKIDENT ('PAT_Patient', RESEED, 0);
delete from ADT_DischargeSummaryConsultant
DBCC CHECKIDENT ('ADT_DischargeSummaryConsultant', RESEED, 0);
--Deleting Users other than Admin
delete from RBAC_MAP_UserRole
where UserId != '1'
DBCC CHECKIDENT ('RBAC_MAP_UserRole', RESEED, 0);
delete from RBAC_User
where UserName != 'admin'
DBCC CHECKIDENT ('RBAC_User', RESEED, 0);
--deleting employees
delete from EMP_Employee
where FirstName != 'admin'
DBCC CHECKIDENT ('EMP_Employee', RESEED, 0);
--deleting service items
delete from BIL_MST_ServiceItem
DBCC CHECKIDENT ('BIL_MST_ServiceItem', RESEED, 0);
--deleting Account Details
delete from ACC_SubLedgerBalanceHistory
DBCC CHECKIDENT ('ACC_SubLedgerBalanceHistory', RESEED, 0);
delete from ACC_MST_SubLedger
DBCC CHECKIDENT ('ACC_MST_SubLedger', RESEED, 0);
delete from ACC_Ledger
DBCC CHECKIDENT ('ACC_Ledger', RESEED, 0);
delete from ADT_Bed
DBCC CHECKIDENT ('ADT_Bed', RESEED, 0);
delete from ADT_MST_BedFeature
DBCC CHECKIDENT ('ADT_MST_BedFeature', RESEED, 0);
delete from ADT_MST_Ward
DBCC CHECKIDENT ('ADT_MST_Ward', RESEED, 0);
delete from BIL_MST_Credit_Organization
DBCC CHECKIDENT ('BIL_MST_Credit_Organization', RESEED, 0);
delete from BIL_MST_Credit_Organization
DBCC CHECKIDENT ('BIL_MST_Credit_Organization', RESEED, 0);
delete from INV_MST_Item
DBCC CHECKIDENT ('INV_MST_Item', RESEED, 0);
delete from INV_MST_Company
DBCC CHECKIDENT ('INV_MST_Company', RESEED, 0);
delete from INV_MST_ItemSubCategory
DBCC CHECKIDENT ('INV_MST_ItemSubCategory', RESEED, 0);
delete from INV_MST_UnitOfMeasurement
DBCC CHECKIDENT ('INV_MST_UnitOfMeasurement', RESEED, 0);
delete from Lab_MAP_TestComponents
DBCC CHECKIDENT ('Lab_MAP_TestComponents', RESEED, 0);
delete from LAB_LabTests
DBCC CHECKIDENT ('LAB_LabTests', RESEED, 0);
delete from PHRM_MST_Stock
DBCC CHECKIDENT ('PHRM_MST_Stock', RESEED, 0);
delete from PHRM_MST_StockBarcode;
delete from PHRM_MST_Item
DBCC CHECKIDENT ('PHRM_MST_Item', RESEED, 0);
delete from PHRM_MST_ItemType
DBCC CHECKIDENT ('PHRM_MST_ItemType', RESEED, 0);
delete from PHRM_MST_Generic
DBCC CHECKIDENT ('PHRM_MST_Generic', RESEED, 0);
delete from PHRM_MST_Category
DBCC CHECKIDENT ('PHRM_MST_Category', RESEED, 0);
delete from PHRM_MST_Company
DBCC CHECKIDENT ('PHRM_MST_Company', RESEED, 0);
delete from PHRM_MST_Rack
DBCC CHECKIDENT ('PHRM_MST_Rack', RESEED, 0);
delete from PHRM_MST_Store
DBCC CHECKIDENT ('PHRM_MST_Store', RESEED, 0);
delete from PHRM_MST_Supplier
DBCC CHECKIDENT ('PHRM_MST_Supplier', RESEED, 0);
delete from PHRM_MST_UnitOfMeasurement
DBCC CHECKIDENT ('PHRM_MST_UnitOfMeasurement', RESEED, 0);
delete from RAD_MST_ImagingItem
DBCC CHECKIDENT ('RAD_MST_ImagingItem', RESEED, 0);
delete from RAD_CFG_ReportTemplates
DBCC CHECKIDENT ('RAD_CFG_ReportTemplates', RESEED, 0);
end try
begin catch
ALTER INDEX [UK_BillingCounterName_Type]ON BIL_CFG_Counter REBUILD
ALTER INDEX [UK_BIL_CFG_FiscalYears] ON BIL_CFG_FiscalYears REBUILD
ALTER INDEX [UQ__CLN_EyeS__D7A3AA55BC800205] ON CLN_EyeScanImages REBUILD
ALTER INDEX [UQ__CLN_MST___4D3AA1DF8A330DC6] ON CLN_MST_EYE REBUILD
ALTER INDEX [UQ__CLN_PAT___D7A3AA5567EF1EDE] ON CLN_PAT_Images REBUILD
ALTER TABLE ER_Patient ENABLE TRIGGER [Emergency_PoliceCase_NotificatiONTrigger]
ALTER INDEX [UniqueOperatiONName] ON MR_MST_OperatiONType REBUILD
ALTER INDEX [UK_Membership_Community] ON PAT_CFG_MembershipType REBUILD
ALTER INDEX [UQ__PAT_Pati__D7A3AA55F0F539DA] ON PAT_PatientFiles REBUILD
ALTER INDEX [IX_TblPatInsuranceInfo_PatientId] ON PAT_PatientInsuranceInfo REBUILD
ALTER INDEX[UK_PHRM_CFG_FiscalYear] ON PHRM_CFG_FiscalYears REBUILD
ALTER TABLE PHRM_StockTxnItems ENABLE TRIGGER [TR_PHRM_StockTxnItems_MRPUpdateHistory]
ALTER TABLE PHRM_StockTxnItems ENABLE TRIGGER [TR_PHRM_StockTxnItems_UpdateStock]
ALTER TABLE PHRM_TXN_InvoiceItems ENABLE TRIGGER [TRG_PHRM_TXN_InvoiceItems_UpdateGRItemPrice]
ALTER TABLE LAB_TestRequisition ENABLE TRIGGER [PRINT_UpdateTrigger]
ALTER INDEX [IX_TblBilDeposit_VisitId] ON BIL_TXN_Deposit DISABLE
ALTER INDEX [IX_TblPatientBedInfo_VisitId] ON ADT_TXN_PatientBedInfo REBUILD
ALTER INDEX [IX_TblAdmission_IsInsurancePatient] ON ADT_PatientAdmission REBUILD
ALTER INDEX [IX_TblAdmission_VisitId_PatientId] ON ADT_PatientAdmission REBUILD
ALTER INDEX [IX_INCTV_TXN_IncentiveFractionItem_BillingTransactionItemId] ON INCTV_TXN_IncentiveFractionItem REBUILD
ALTER INDEX [IX_INCTV_TXN_IncentiveFractionItem_IncentiveReceiverId] ON INCTV_TXN_IncentiveFractionItem REBUILD
ALTER INDEX [UK_IncentiveFractionItems] ON INCTV_TXN_IncentiveFractionItem REBUILD
ALTER TABLE BIL_SYNC_BillingAccounting ENABLE TRIGGER [TRG_BillToAcc_BillSync]
ALTER INDEX [IX_TblVisit_HasInsurance_VisitDate] ON PAT_PatientVisits REBUILD
ALTER INDEX [IX_TblVisit_PatientId] ON PAT_PatientVisits REBUILD
ALTER INDEX [IX_TblVisits_ClaimCode] ON PAT_PatientVisits REBUILD
ALTER TABLE PAT_PatientVisits DISABLE TRIGGER [PAT_PatientVisits_NotificationTrigger]
ALTER INDEX [IX_BIL_BillingTransaction_CreatedOn] ON BIL_TXN_BillingTransaction REBUILD