<ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll Amazon.Lambda.S3Events AWSSDK.Core AWSSDK.S3 Amazon Amazon.Auth.AccessControlPolicy Amazon.Auth.AccessControlPolicy.ActionIdentifiers Amazon.Internal Amazon.Lambda.S3Events Amazon.MissingTypes Amazon.Runtime Amazon.Runtime.CredentialManagement Amazon.Runtime.CredentialManagement.Internal Amazon.Runtime.EventStreams Amazon.Runtime.EventStreams.Internal Amazon.Runtime.Internal Amazon.Runtime.Internal.Auth Amazon.Runtime.Internal.Settings Amazon.Runtime.Internal.Transform Amazon.Runtime.Internal.Util Amazon.Runtime.SharedInterfaces Amazon.Runtime.SharedInterfaces.Internal Amazon.S3 Amazon.S3.Encryption Amazon.S3.Encryption.Internal Amazon.S3.Internal Amazon.S3.IO Amazon.S3.Model Amazon.S3.Model.Internal.MarshallTransformations Amazon.S3.Transfer Amazon.S3.Util Amazon.Util Amazon.Util.Internal Amazon.Util.Internal.PlatformServices Newtonsoft.Json Newtonsoft.Json.Converters Newtonsoft.Json.Linq Newtonsoft.Json.Schema Newtonsoft.Json.Serialization System System.Diagnostics System.Diagnostics.Tracing System.IO.Compression ThirdParty.BouncyCastle.Asn1 ThirdParty.BouncyCastle.Asn1.Utilities ThirdParty.BouncyCastle.Math ThirdParty.BouncyCastle.OpenSsl ThirdParty.BouncyCastle.Utilities.IO.Pem ThirdParty.Ionic.Zlib ThirdParty.Json.LitJson ThirdParty.MD5 void Main() { var data = @"CaseTypeFamily Name SkipICD ICD10Code MSDRGCode M-420 1 Cervical Level Anterior Approach FALSE 0RG0070 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG00A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG00J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG00K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG0370 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG03A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG03J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG03K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG0470 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG04A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG04J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG04K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG1070 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG10A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG10J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG10K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG1370 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG13A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG13J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG13K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG1470 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG14A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG14J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG14K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG4070 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG40A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG40J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG40K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG4370 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG43A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG43J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG43K0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG4470 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG44A0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG44J0 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG44K0 471 M-421 1 Cervical Level Open Approach FALSE XRG0092 471 M-421 1 Cervical Level Open Approach FALSE XRG00F3 471 M-421 1 Cervical Level Open Approach FALSE XRG1092 471 M-421 1 Cervical Level Open Approach FALSE XRG10F3 471 M-421 1 Cervical Level Open Approach FALSE XRG4092 471 M-421 1 Cervical Level Open Approach FALSE XRG40F3 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG0071 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG007J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG00AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG00J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG00JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG00K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG00KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG0371 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG037J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG03AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG03J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG03JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG03K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG03KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG0471 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG047J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG04AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG04J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG04JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG04K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG04KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG1071 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG107J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG10AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG10J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG10JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG10K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG10KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG1371 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG137J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG13AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG13J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG13JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG13K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG13KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG1471 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG147J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG14AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG14J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG14JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG14K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG14KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG4071 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG407J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG40AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG40J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG40JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG40K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG40KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG4371 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG437J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG43AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG43J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG43JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG43K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG43KJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG4471 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG447J 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG44AJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG44J1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG44JJ 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG44K1 471 M-422 1 Cervical Level Posterior Approach FALSE 0RG44KJ 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2070 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20A0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20J0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20K0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2370 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23A0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23J0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23K0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2470 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24A0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24J0 471 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24K0 471 M-424 2+ Cervical Level Open Approach FALSE XRG2092 471 M-424 2+ Cervical Level Open Approach FALSE XRG20F3 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2071 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG207J 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20AJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20J1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20JJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20K1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20KJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2371 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG237J 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23AJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23J1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23JJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23K1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23KJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2471 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG247J 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24AJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24J1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24JJ 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24K1 471 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24KJ 471 M-420 1 Cervical Level Anterior Approach FALSE 0RG0070 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG00A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG00J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG00K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG0370 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG03A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG03J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG03K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG0470 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG04A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG04J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG04K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG1070 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG10A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG10J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG10K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG1370 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG13A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG13J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG13K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG1470 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG14A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG14J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG14K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG4070 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG40A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG40J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG40K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG4370 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG43A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG43J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG43K0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG4470 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG44A0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG44J0 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG44K0 472 M-421 1 Cervical Level Open Approach FALSE XRG0092 472 M-421 1 Cervical Level Open Approach FALSE XRG00F3 472 M-421 1 Cervical Level Open Approach FALSE XRG1092 472 M-421 1 Cervical Level Open Approach FALSE XRG10F3 472 M-421 1 Cervical Level Open Approach FALSE XRG4092 472 M-421 1 Cervical Level Open Approach FALSE XRG40F3 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG0071 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG007J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG00AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG00J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG00JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG00K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG00KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG0371 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG037J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG03AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG03J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG03JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG03K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG03KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG0471 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG047J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG04AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG04J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG04JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG04K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG04KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG1071 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG107J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG10AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG10J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG10JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG10K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG10KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG1371 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG137J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG13AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG13J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG13JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG13K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG13KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG1471 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG147J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG14AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG14J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG14JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG14K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG14KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG4071 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG407J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG40AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG40J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG40JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG40K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG40KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG4371 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG437J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG43AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG43J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG43JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG43K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG43KJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG4471 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG447J 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG44AJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG44J1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG44JJ 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG44K1 472 M-422 1 Cervical Level Posterior Approach FALSE 0RG44KJ 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2070 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20A0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20J0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20K0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2370 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23A0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23J0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23K0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2470 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24A0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24J0 472 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24K0 472 M-424 2+ Cervical Level Open Approach FALSE XRG2092 472 M-424 2+ Cervical Level Open Approach FALSE XRG20F3 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2071 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG207J 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20AJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20J1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20JJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20K1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20KJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2371 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG237J 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23AJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23J1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23JJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23K1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23KJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2471 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG247J 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24AJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24J1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24JJ 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24K1 472 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24KJ 472 M-420 1 Cervical Level Anterior Approach FALSE 0RG0070 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG00A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG00J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG00K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG0370 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG03A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG03J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG03K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG0470 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG04A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG04J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG04K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG1070 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG10A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG10J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG10K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG1370 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG13A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG13J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG13K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG1470 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG14A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG14J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG14K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG4070 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG40A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG40J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG40K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG4370 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG43A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG43J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG43K0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG4470 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG44A0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG44J0 473 M-420 1 Cervical Level Anterior Approach FALSE 0RG44K0 473 M-421 1 Cervical Level Open Approach FALSE XRG0092 473 M-421 1 Cervical Level Open Approach FALSE XRG00F3 473 M-421 1 Cervical Level Open Approach FALSE XRG1092 473 M-421 1 Cervical Level Open Approach FALSE XRG10F3 473 M-421 1 Cervical Level Open Approach FALSE XRG4092 473 M-421 1 Cervical Level Open Approach FALSE XRG40F3 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG0071 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG007J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG00AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG00J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG00JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG00K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG00KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG0371 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG037J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG03AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG03J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG03JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG03K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG03KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG0471 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG047J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG04AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG04J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG04JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG04K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG04KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG1071 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG107J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG10AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG10J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG10JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG10K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG10KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG1371 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG137J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG13AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG13J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG13JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG13K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG13KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG1471 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG147J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG14AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG14J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG14JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG14K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG14KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG4071 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG407J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG40AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG40J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG40JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG40K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG40KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG4371 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG437J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG43AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG43J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG43JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG43K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG43KJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG4471 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG447J 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG44AJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG44J1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG44JJ 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG44K1 473 M-422 1 Cervical Level Posterior Approach FALSE 0RG44KJ 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2070 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20A0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20J0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG20K0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2370 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23A0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23J0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG23K0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG2470 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24A0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24J0 473 M-423 2+ Cervical Level Anterior Approach FALSE 0RG24K0 473 M-424 2+ Cervical Level Open Approach FALSE XRG2092 473 M-424 2+ Cervical Level Open Approach FALSE XRG20F3 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2071 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG207J 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20AJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20J1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20JJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20K1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG20KJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2371 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG237J 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23AJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23J1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23JJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23K1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG23KJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG2471 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG247J 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24AJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24J1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24JJ 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24K1 473 M-425 2+ Cervical Level Posterior Approach FALSE 0RG24KJ 473"; var rows = data.Split("\n".ToCharArray()) .Skip(1) .ToList() .ConvertAll(d => new NewCaseTypeFamilyMapping(d.Trim("\r".ToCharArray()).Split('\t'))) .GroupBy(d => d.CaseTypeFamily, (key, info) => new { CaseTypeFamily = key, data = info.ToList(), sql = info.Aggregate(new StringBuilder($@" SELECT @CaseTypeFamilyID = ctf.CaseTypeFamilyID FROM dss.CaseTypeFamily AS ctf WHERE ctf.CaseTypeFamilyGlobalID = '{key}' INSERT INTO dss.CaseTypeFamilyMappingICD10 ( CaseTypeFamilyID, SkipICD, ICD10Code, MSDRGCode, CaseTypeFamilyVersionID ) VALUES "), (x, y) => x.AppendLine(y.ToString())).ToString().TrimEnd(new[] { '\r', '\n', ',' }), rollback = $@"DELETE FROM dss.CaseTypeFamilyMappingICD10 WHERE EXISTS(SELECT 1 FROM dss.CaseTypeFamily AS ctf WHERE ctf.CaseTypeFamilyGlobalID = '{key}' and CaseTypeFamilyMappingICD10.CaseTypeFamilyID = ctf.CaseTypeFamilyID AND CaseTypeFamilyVersionID = 1) DELETE FROM dss.CaseTypeFamily WHERE CaseTypeFamilyGlobalID = '{key}' " }); var sqlScript = $@"--Author: tlamb --Version: 2019.42 --Forward DELETE FROM dss.CaseTypeFamilyMappingICD10 WHERE EXISTS(SELECT 1 FROM dss.CaseTypeFamily AS ctf WHERE ctf.CaseTypeFamilyID = CaseTypeFamilyMappingICD10.CaseTypeFamilyID AND ctf.CaseTypeFamilyGlobalID = 'M-61') AND CaseTypeFamilyMappingICD10.MSDRGCode IN('471','472','473') AND CaseTypeFamilyMappingICD10.SkipICD = 1 AND CaseTypeFamilyMappingICD10.CaseTypeFamilyVersionID = 1 INSERT INTO dss.CaseTypeFamily(CaseTypeFamilyGUID, Name, CaseTypeFamilyGlobalID) VALUES(NEWID(), '1 Cervical Level Anterior Approach', 'M-420'), (NEWID(), '1 Cervical Level Open Approach', 'M-421'), (NEWID(), '1 Cervical Level Posterior Approach', 'M-422'), (NEWID(), '2+ Cervical Level Anterior Approach', 'M-423'), (NEWID(), '2+ Cervical Level Open Approach', 'M-424'), (NEWID(), '2+ Cervical Level Posterior Approach', 'M-425') DECLARE @CaseTypeFamilyID INT {string.Join("\r\n", rows.Select(r => r.sql))} --Rollback {string.Join("\r\n", rows.Select(r => r.rollback))}"; sqlScript.Dump("script"); File.WriteAllText(@"D:\git\2019-10-01-11-14 B-24302 UV Case Type Family Updates.sql", sqlScript); rows.Dump(); // var sql = rows.Aggregate(new StringBuilder("DECLARE @CaseTypeFamilyID INT"), // (x, y) => x.AppendLine( // data.Aggregate(new StringBuilder($"SELECT @CaseTypeFamilyID = ctf.CaseTypeFamilyID FROM dss.CaseTypeFamily AS ctf WHERE ctf.CaseTypeFamilyGlobalID = '{y.CaseTypeFamily}'"), // (a, b) => a.AppendLine(b.ToString())).ToString())).ToString(); // sql.Dump(); } // Define other methods and classes here public class NewCaseTypeFamilyMapping { public string CaseTypeFamily { get; set; } public string Name { get; set; } internal bool bSkipICD { get; set; } public int SkipICD => bSkipICD ? 1 : 0; public string ICD10Code { get; set; } public string MSDRGCode { get; set; } public NewCaseTypeFamilyMapping(string[] data) { if (data.Length != 5) throw new ArgumentException(nameof(data)); CaseTypeFamily = data[0]; Name = data[1]; bSkipICD = bool.Parse(data[2]); ICD10Code = data[3]; MSDRGCode = data[4]; } public override string ToString() { //return $"\t(@CaseTypeFamilyID, '{Name}', {SkipICD}, '{ICD10Code}', '{MSDRGCode}', 1),"; return $"\t(@CaseTypeFamilyID, {SkipICD}, '{ICD10Code}', '{MSDRGCode}', 1),"; } }