Thursday, 3 July 2014

What’s the difference between 837 Institutional, Professional, Dental?

What’s the difference between 837 Institutional, Professional, Dental?

Dear Blog Readers – HIPAA Friday To You! Last week we defined how other HIPAA EDI transactions may or may not to other 837 transactions. Today is our HIPAA EDI Day and the topic of the day is to simply provide you the list of how you can tell apart the 837 Institutional, from the 837 Professional, or from the 837 Dental.

837 Institutional, Professional, Dental

The 837 transaction has three different implementation guides specifically developed for Professional, Institutional and Dental claims. The specifications are geared to meet the individual requirements of the three different types of claim forms. For instance, the 837 Institutional manual allows for Value Codes, Occurrence Codes and Occurrence Spans. These fields are specific to the UB04 claim form only. The 837 Dental manual allows for Dental Coding and Tooth Designations. These are only used on dental claim forms. The SV segment occurs on each of the three 837 transactions but there is a slight variation for each claim. Professional uses an SV1 segment, Institutional uses an SV2 segment and Dental uses an SV3segment. This is a quick way to determine what type of 837 file is being encountered.

Structurally, all three sets of 837 specifications are same. The only differences would be claim specific data that pertains to a single transaction. All three transactions contain ISA, GS and ST segments but some data and qualifying codes are specific to the type of 837. Another way to quickly identify which type of 837 is being encountered is by the codes sent in the GS-08 or in the ST-03. Professionals use a 005010X222, Institutional uses a 005010X223 and Dental uses a 005010X224.
The most popular EDI claim type is the professional.


Professional

edi billing

Institutional

edi solution for payers

Dental

edi health care edi billing

837 Institutional EDI UB04 Claim Example

Beacon EDI Is a Clearinghouse

837 Institutional Claim Scenario

The included example shows a standard 837 Institutional claim. There are two claims in this scenario (Two CLM 2300 Loop Levels)
Here are the attributes of the example:
- The submitter of these claims is UCLA MEDICAL CENTER
- The receiver of the claim is BCBS DISNEY
- The billing provider is UCLA MEDICAL CENTER
- The first patient “Mickey Mouse” is the subscriber
- The payer is BCBS DISNEY
- Mickey Mouse visited the emergency room because he had an open wound (ICD-9 8842) when he was driving around with Donald Duck (E8199 Person injured in unspecified motor-vehicle accident) and went to visit the hospital.
- Mickey’s visit was on January 24th, 2012
- Where Mickey was admitted to the Hospital ER Procedure Code 99201 (HCPCS) $150 and treated by Dr. Watson with a Laceration Repair Procedure Code 26591 (HCPCS) – cost $75
- The second patient “Donald Duck” is the subscriber and was treated by Dr. Watson with the same procedure and diagnosis codes.
- Donald and Mickey had the same insurance except Donald had a different member ID with BCBS Disney.

837 Institutional Deciphering Raw Data BHT – 2000A

Beginning of Hierarchical Transaction:  BHT*0019*00*004545*20120124*135420*CH
BHT01    Hierarchical Structure Code : Information Source, Subscriber, Dependent
BHT02    Transaction Set Purpose Code : Original
BHT03    Reference Identification : 004545
BHT04    Date : 1/24/2012
BHT05    Time : 1:54:20 PM
BHT06    Transaction Type Code : Chargeable
LOOP 1000A Submitter Name
Submitter Information:  NM1*41*2*UCLA MEDICAL CENTER*****46*1982
NM101    Entity Identifier Code : Submitter
NM102    Entity Type Qualifier : Non-Person Entity
NM103    Name Last or Organization Name : UCLA MEDICAL CENTER
NM108    Identification Code Qualifier : Electronic Transmitter Identification Number (ETIN)
NM109    Identification Code : 1982
 Submitter Contact Information: PER*IC*ANN GILLIS*TE*8185601000
 PER01     Contact Type: Information Contact “IC”
 PER02     Contact Name: ANN GILLIS
 PER03     Communication Qualifier: Telephone “TE”
 PER04     Telephone Number: 8185601000
LOOP 1000B Receiver Name
Receiver Information: NM1*40*2*BCBS DISNEY*****46*47198
NM101    Entity Identifier Code : Receiver “40″
NM102    Entity Type Qualifier : Non-Person Entity  “2″
NM103    Name Last or Organization Name : BCBS DISNEY
NM108    Identification Code Qualifier : Electronic Transmitter Identification Number (ETIN)  “46″
NM109    Identification Code : 47198

LOOP 2000A BILLING PROVIDER

Billing Provider Hierarchical Level: HL*1**20*1
HL01     Hierarchical ID: 1
HL02     Parent Hierarchical ID: No Parent
HL03     Hierarchy Level Name: “20″ = Information Source
HL04     Number of Hierarchical Children: 1 more additional subordinate HL
 Provider Specialty Information: PRV*BI*PXC* 203BA0200N
 PRV01     Type of Provider: Billing “BI”
 PRV02     Code Qualifier: Health Care Provider Taxonomy Code “PXC”
 PRV03     Provider Taxonomy Code: 203BA0200N
837 Institutional Deciphering Raw Data 201AA – 2000B

LOOP 2010AA BILLING PROVIDER NAME

 Billing Provider Information: NM1*85*2*UCLA MEDICAL CENTER*****XX*1215193883
 NM101    Entity Identifier Code : Billing Provider “85″
 NM102    Entity Type Qualifier : Person “2″ Organization
 NM103    Name Last or Organization Name : UCLA MEDICAL CENTER
 NM108    Identification Code Qualifier : National Provider Identifier “XX”
 NM109    NPI: 1215193883
  Billing Provider Address:757 WESTWOOD PLAZA
  N301     Street Address: 757 WESTWOOD PLAZA
  Billing Provider City, State, ZIP Code: N4*LOS ANGELES*CA*900257437
  N401     City: LOS ANGELES
  N402     State: CA
  N403     Zip: 900257437
  Billing Provider Tax Identification: REF*EI*123456789
  REF01    Reference Qualifier: Employer’s Identification Number “EI”
  REF02    EIN: 123456789
LOOP 2000B SUBSCRIBER HIERARCHICAL (Claim 1)
Subscriber Hierarchical Level: HL*2*1*22*0
  HL01     Hierarchical ID: 2
  HL02     Parent Hierarchical ID: 1 (Information Source/Billing Provider)
  HL03     Hierarchy Level Name: “22″ = Subscriber
  HL04     Number of Hierarchical Children: 0 (Subscriber is the patient)
  Subscriber Information: SBR*P*18*******CI
  SBR01    Payer Responsibility Sequence Number Code: Primary  “P”
  SBR02    Individual Relationship Code: Self  “18″
  SBR09    Code identifying type of claim: Commercial Insurance Co. “CI”
   LOOP 2010BA SUBSCRIBER NAME
   Subscriber Information: NM1*IL*1*MOUSE*MICKEY****MI*60345914A
   NM101    Entity Identifier Code : Subscriber  “IL”
   NM102    Entity Type Qualifier : Person “1″
   NM103    Subscriber Last Name: Mouse
   NM104    Subscriber First Name: Mickey
   NM108    Identification Code Qualifier : Member Identification Number “MI”
   NM109    Member Identification Number: 60345914A
    Subscriber Address: N3*1565 DISNEYLAND DRIVE*SUITE 101
    N301     Street Address: 1565 DISNEYLAND DRIVE
    N302    Street Address Line 2:SUITE 101
    Subscriber City, State, ZIP Code: N4*ANAHEIM*CA*92802
    N401     City: ANAHEIM
    N402     State: CA
    N403     Zip: 92802
   Subscriber Demographic Information: DMG*D8*19281118*M
    DMG01    Date Time Period Format Qualifier: Date Expressed in Format CCYYMMDD “D8″
    DMG02    Subscriber Birth Date: 19281118
    DMG03    Subscriber Gender Code: ‘M’ for Male
    Subscriber Secondary Identification: REF*SY*055090001
    REF01    Reference Qualifier: Social Security Number “SY”
    REF02    SSN: 055090001

837 Institutional Deciphering Raw Data 2010BB – 2400 (Claim 1)

   LOOP ID – 2010BB PAYER NAME
   Payer Name: NM1*PR*2*BCBS DISNEY*****PI*8584537845
    NM101    Entity Identifier Code : Payer “PR”
    NM102    Entity Type Qualifier : Non-Person Entity  “2″
    NM103    Name Last or Organization Name : BCBS DISNEY
    NM108    Identification Code Qualifier :  National Plan ID “PI”
    NM109    Identification Code : 8584537845
   LOOP 2300 CLAIM INFORMATION
   Claim Information: CLM*ABC9001*225***22:A:1*Y*C*Y*Y
CLM01    Claim ID: ABC9001
CLM02    Claim Amount: 225
CLM05-1 Place of Service Code: ’22′ Outpatient Hospital
CLM05-2 Facility Code Qualifier: ‘A’ Uniform Billing Claim Form Bill Type
CLM05-3 Claim Frequency Code: ’1′ The only bill to be received for a course of treatment
CLM06    Provider or Supplier Signature On File Indicator: ‘Y’ Yes
CLM07    Assignment or Plan Participation Code: ‘C’ Not Assigned
CLM08    Benefit Indicator: ‘Y’ Yes – Subscriber authorized the payer to remit payment directly to the provider
CLM09    Release of Information Indicator: ‘Y’ Yes – Provider has a Signed Statement Permitting Release of Medical Billing Data Related to a Claim
     ICD9Diagnosis Codes:
     HI*BK:8842
     HI01-1 ‘BK’ for Primary Diagnosis    HI01-2: 8842 (Open Wound)
     HI*PR:8842
     HI01-1 ‘BK’ for Patient’s Reason For Visit HI01-2: 8842 (Open Wound)
HI*BN:E8199
HI01-1 ‘BN’ for External Cause Of Injury HI01-2: (E8199 Person injured in unspecified motor-vehicle accident)
  LOOP 2400 SERVICE LINE
  Service Line Number 1: LX*1
     LOOP 2310A ATTENDING PROVIDER NAME
     Attending Provider Name: NM1*71*1*WATSON*JOHN*H***XX*1134125736
     NM101    Entity Identifier Code : Attending Provider “71″
     NM102    Entity Type Qualifier : Person “1″
     NM103    Name Last or Organization Name : WATSON
     NM104    First Name: WATSON
     NM103    Middle Name or Initial: WATSON
     NM108    Identification Code Qualifier : National Provider Identifier “XX”
     NM109    NPI: 1134125736
  Institutional Service Line Item Details: SV2*0450*HC:99201*150*UN*1
SV201      Service Line Revenue Code: 0450
SV202-01 Procedure Code Qualifier: ‘HC’ HCPCS
SV202-02 Procedure Code: 99201 (Hospital Visit)
SV203      Procedure Amount:  $150
SV204      Unit of Measure Code: ‘UN’ Units
SV205     Service Unit Count: 1
   Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
      Date Time Period : 20120124
  Service Line Number 2: LX*2
  Institutional Service Line Item Details: SV2*0360*HC:26591*75*UN*1
SV201    Service Line Revenue Code: 0360
SV202-01 Procedure Code Qualifier: ‘HC’ HCPCS
SV202-02 Procedure Code: 26591 (Laceration Repair)
SV203    Procedure Amount:  $75
SV204    Unit of Measure Code: ‘UN’ Units
SV205    Service Unit Count: 1
   Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
      Date Time Period : 20120124

837 Institutional Deciphering Raw Data 2000B – 2300 (Claim 2)

Grayed out  and smaller font items indicate that the elements are the same as in Claim 1
LOOP 2000B SUBSCRIBER HIERARCHICAL (Claim 2)
Subscriber Hierarchical Level: HL*3*1*22*0
  HL01     Hierarchical ID: 3
  HL02     Parent Hierarchical ID: 1 (Information Source/Billing Provider)
  HL03     Hierarchy Level Name: “22″ = Subscriber
  HL04     Number of Hierarchical Children: 0 (Subscriber is the patient)
 LOOP 2010BA SUBSCRIBER NAME
   Subscriber Information: NM1*IL*1*DUCK*DONALD****MI*60345914B
   NM101    Entity Identifier Code : Subscriber  “IL”
   NM102    Entity Type Qualifier : Person “1″
   NM103    Subscriber Last Name: Duck
   NM104    Subscriber First Name: Donald
   NM108    Identification Code Qualifier : Member Identification Number “MI”
   NM109    Member Identification Number: 60345914B
    Subscriber Address: N3*1565 DISNEYLAND DRIVE*SUITE 102
    N301     Street Address: 1565 DISNEYLAND DRIVE
    N302    Street Address Line 2:SUITE 102
    Subscriber City, State, ZIP Code: N4*ANAHEIM*CA*92802
    N401     City: ANAHEIM
    N402     State: CA
    N403     Zip: 92802
      Subscriber Demographic Information: DMG*D8*19340619*M
    DMG01    Date Time Period Format Qualifier: Date Expressed in Format CCYYMMDD “D8″
    DMG02    Subscriber Birth Date: 19340619
    DMG03    Subscriber Gender Code: ‘M’ for Male
    Subscriber Secondary Identification: REF*SY*066080002
    REF01    Reference Qualifier: Social Security Number “SY”
    REF02    SSN: 066080002

837 Institutional Deciphering Raw Data 2010BB -2300 – 2400 (Claim 2)

  LOOP ID – 2010BB PAYER NAME
    Payer Name: NM1*PR*2*BCBS DISNEY*****PI*8584537845
    NM101    Entity Identifier Code : Payer “PR”
    NM102    Entity Type Qualifier : Non-Person Entity  “2″
    NM103    Name Last or Organization Name : BCBS DISNEY
    NM108    Identification Code Qualifier :  National Plan ID “PI”
    NM109    Identification Code : 8584537845

   LOOP 2300 CLAIM INFORMATION

    Claim Information: CLM*ABC9002*225***22:A:1*Y*C*Y*Y

CLM01    Claim ID: ABC9002
CLM02    Claim Amount: 225
CLM05-1 Place of Service Code: ’22′ Outpatient Hospital
CLM05-2 Facility Code Qualifier: ‘A’ Uniform Billing Claim Form Bill Type
CLM05-3 Claim Frequency Code: ’1′ The only bill to be received for a course of treatment
CLM06    Provider or Supplier Signature On File Indicator: ‘Y’ Yes
CLM07    Assignment or Plan Participation Code: ‘C’ Not Assigned
CLM08    Benefit Indicator: ‘Y’ Yes – Subscriber authorized the payer to remit payment directly to the provider
CLM09    Release of Information Indicator: ‘Y’ Yes – Provider has a Signed Statement Permitting Release
     ICD9Diagnosis Codes:
     HI*BK:8842
     HI01-1 ‘BK’ for Primary Diagnosis    HI01-2: 8842 (Open Wound)
     HI*PR:8842
     HI01-1 ‘BK’ for Patient’s Reason For Visit HI01-2: 8842 (Open Wound)
HI*BN:E8199HI01-1 ‘BN’ for External Cause Of Injury HI01-2: (E8199 Person injured in unspecified motor-vehicle accident)
LOOP 2400 SERVICE LINE
  Service Line Number 1: LX*1
     LOOP 2310A ATTENDING PROVIDER NAME
     Attending Provider Name: NM1*71*1*WATSON*JOHN*H***XX*1134125736
     NM101    Entity Identifier Code : Attending Provider “71″
     NM102    Entity Type Qualifier : Person “1″
     NM103    Name Last or Organization Name : WATSON
     NM104    First Name: WATSON
     NM103    Middle Name or Initial: WATSON
     NM108    Identification Code Qualifier : National Provider Identifier “XX”
     NM109    NPI: 1134125736
  Institutional Service Line Item Details: SV2*0450*HC:99201*150*UN*1
SV201      Service Line Revenue Code: 0450
SV202-01 Procedure Code Qualifier: ‘HC’ HCPCS
SV202-02 Procedure Code: 99201 (Hospital Visit)
SV203      Procedure Amount:  $150
SV204      Unit of Measure Code: ‘UN’ Units
SV205     Service Unit Count: 1
   Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
     Date Time Period : 20120124
  Service Line Number 2: LX*2
  Institutional Service Line Item Details: SV2*0360*HC:26591*75*UN*1
SV201    Service Line Revenue Code: 0360
SV202-01 Procedure Code Qualifier: ‘HC’ HCPCS
SV202-02 Procedure Code: 26591 (Laceration Repair)
SV203    Procedure Amount:  $75
SV204    Unit of Measure Code: ‘UN’ Units
SV205    Service Unit Count: 1
  Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
      Date Time Period : 20120124

837 EDI Professional Claim Example and Mapping


edi software

837 Professional Claim Scenario

The included example shows a standard 837 Professional claim file. It includes data from the provider of Service indicating the member’s demographic information, diagnosis, services rendered and charges. This data will be used by the Insurance Company to determine what benefits should be rendered.
Here are the attributes of the example:
- The submitter of the claim is AGILE BILLING SOLUTIONS
- The receiver of the claim is BCBS DISNEY
- The billing provider is JOHN WATSON
- The patient “Mickey Mouse” is the subscriber
- The payer is BCBS DISNEY
- Mickey Mouse had felt like he had Diarrhea (ICD-9 787.91) and went to visit the doctor and the doctor diagnosed him with the stomach flu (e.g. Gastroenteritis) ICD-9 Codes 787.91 (primary), 009.0 (primary), 009.1, 558
- Mickey’s initial office visit was on January 24th, 2012 – Where Mickey spent 15 minutes with Dr. Watson face-to-face and the diagnosis code for Diarrhea was established – Procedure Code 99213 (HCPCS) – cost $50
After the office Visit Mickey went to the lab for a Stool Culture lab test procedure Code 87046 – cost $15 The lab services were performed at the BEST LAB COMPANY

837 Deciphering Raw Data BHT – 2000A

Beginning of Hierarchical Transaction:  BHT*0019*00*004545*20120124*135420*CH

BHT01    Hierarchical Structure Code : Information Source, Subscriber, Dependent
BHT02    Transaction Set Purpose Code : Original
BHT03    Reference Identification : 004545
BHT04    Date : 1/24/2012
BHT05    Time : 1:54:20 PM
BHT06    Transaction Type Code : Chargeable

LOOP 1000A Submitter Name

Submitter Information:  NM1*41*2*AGILE BILLING SOLUTIONS*****46*1981

NM101    Entity Identifier Code : Submitter
NM102    Entity Type Qualifier : Non-Person Entity
NM103    Name Last or Organization Name : AGILE BILLING SOLUTIONS
NM108    Identification Code Qualifier : Electronic Transmitter Identification Number (ETIN)
NM109    Identification Code : 1981
 Submitter Contact Information: PER*IC*ANN GILLIS*TE*8185601000
 PER01     Contact Type: Information Contact “IC”
 PER02     Contact Name: ANN GILLIS
 PER03     Communication Qualifier: Telephone “TE”
 PER04     Telephone Number: 8185601000

LOOP 1000B Receiver Name

Receiver Information: NM1*40*2*BCBS DISNEY*****46*47198

NM101    Entity Identifier Code : Receiver “40″
NM102    Entity Type Qualifier : Non-Person Entity  “2″
NM103    Name Last or Organization Name : BCBS DISNEY
NM108    Identification Code Qualifier : Electronic Transmitter Identification Number (ETIN)  “46″
NM109    Identification Code : 47198

LOOP 2000A BILLING PROVIDER

Billing Provider Hierarchical Level: HL*1**20*1

HL01     Hierarchical ID: 1
HL02     Parent Hierarchical ID: No Parent
HL03     Hierarchy Level Name: “20″ = Information Source
HL04     Number of Hierarchical Children: 1 more additional subordinate HL
 Provider Specialty Information: PRV*BI*PXC*207Q00000X
 PRV01     Type of Provider: Billing “BI”
 PRV02     Code Qualifier: Health Care Provider Taxonomy Code “PXC”
 PRV03     Provider Taxonomy Code: 207Q00000X

837 Deciphering Raw Data 201AA – 2000B
LOOP 2010AA BILLING PROVIDER NAME

Billing Provider Information: NM1*85*1*WATSON*JOHN*H***XX*1134125736

 NM101    Entity Identifier Code : Billing Provider “85″
 NM102    Entity Type Qualifier : Person “1″
 NM103    Name Last or Organization Name : WATSON
 NM104    First Name: WATSON
 NM103    Middle Name or Initial: WATSON
 NM108    Identification Code Qualifier : National Provider Identifier “XX”
 NM109    NPI: 1134125736
  Billing Provider Address :N3*221 Baker Street
  N301     Street Address: 221 Baker Street
  Billing Provider City, State, ZIP Code: N4*ANAHEIM*CA*92802
  N401     City: ANAHEIM
  N402     State: CA
  N403     Zip: 92802
  Billing Provider Tax Identification: REF*EI*123456789  
  REF01    Reference Qualifier: Employer’s Identification Number “EI”
  REF02    EIN: 123456789

LOOP 2000B SUBSCRIBER HIERARCHICAL
Subscriber Hierarchical Level: HL*2*1*22*0

  HL01     Hierarchical ID: 2
  HL02     Parent Hierarchical ID: 1 (Information Source/Billing Provider)
  HL03     Hierarchy Level Name: “22″ = Subscriber
  HL04     Number of Hierarchical Children: 0 (Subscriber is the patient)

Subscriber Information: SBR*P*18*******CI

  SBR01    Payer Responsibility Sequence Number Code: Primary  “P”
  SBR02    Individual Relationship Code: Self  “18″
  SBR09    Code identifying type of claim: Commercial Insurance Co. “CI”

LOOP 2010BA SUBSCRIBER NAME
Subscriber Information: NM1*IL*1*MOUSE*MICKEY****MI*60345914A

   NM101    Entity Identifier Code : Subscriber  “IL”
   NM102    Entity Type Qualifier : Person “1″
   NM103    Subscriber Last Name: Mouse
   NM104    Subscriber First Name: Mickey
   NM108    Identification Code Qualifier : Member Identification Number “MI”
   NM109    Member Identification Number: 60345914A
    Subscriber Address: N3*1565 DISNEYLAND DRIVE
    N301     Street Address: 1565 DISNEYLAND DRIVE
    Subscriber City, State, ZIP Code: N4*ANAHEIM*CA*92802
    N401     City: ANAHEIM
    N402     State: CA
    N403     Zip: 92802
   Subscriber Demographic Information: DMG*D8*19281118*M
    DMG01    Date Time Period Format Qualifier: Date Expressed in Format CCYYMMDD “D8″
    DMG02    Subscriber Birth Date: 19281118
    DMG03    Subscriber Gender Code: ‘M’ for Male
    Subscriber Secondary Identification: REF*SY*055090001
    REF01    Reference Qualifier: Social Security Number “SY”
    REF02    SSN: 055090001

837 Deciphering Raw Data 2010BB – 2400

    LOOP ID – 2010BB PAYER NAME

    Payer Name: NM1*PR*2*BCBS DISNEY*****PI*8584537845
    NM101    Entity Identifier Code : Payer “PR”
    NM102    Entity Type Qualifier : Non-Person Entity  “2″
    NM103    Name Last or Organization Name : BCBS DISNEY
    NM108    Identification Code Qualifier :  National Plan ID “PI”
    NM109    Identification Code : 8584537845

   LOOP 2300 CLAIM INFORMATION

   Claim Information: CLM*ABC7001*65***11:B:1*Y*A*Y*Y
    CLM01    Claim ID: ABC7001
    CLM02    Claim Amount: 65
    CLM05-1  Place of Service Code: ’11′ Office
    CLM05-2  Facility Code Qualifier: ‘B’ Place of Service Codes for Professional or Dental Services
    CLM05-3  Claim Frequency Code: ’1′ The only bill to be received for a course of treatment
    CLM06    Provider or Supplier Signature On File Indicator: ‘Y’ Yes
    CLM07    Plan Participation Code: ‘A’ Assigned – Provider accepts agreement with payer
    CLM08    Benefit Indicator: ‘Y’ Subscriber authorized payer to remit payment directly to the provider
    CLM09    Release of Information Indicator: ‘Y’ Provider has a Statement Permitting Release of Medical Billing Data Related to a Claim
     ICD9Diagnosis Codes: HI*BK:78791*BF:0091*BF:558*BF:0090
     HI01-1  ‘BK’ for (DX1) Primary Diagnosis    HI01-2: 78791
     HI02-1  ‘BF’ for (DX2) Supporting Diagnosis HI02-2: 0091
     HI03-1  ‘BF’ for (DX3) Supporting Diagnosis HI03-2: 558
     HI04-1  ‘BF’ for (DX4) Supporting Diagnosis HI04-2: 0090

  LOOP 2400 SERVICE LINE

  Service Line Number 1: LX*1

  Professional Service Line Item Details: SV1*HC:99213*50*UN*1***1

  SV101-01 Procedure Code Qualifier: ‘HC’ HCPCS
  SV101-02 Procedure Code: 99213
  SV102    Procedure Amount:  $50
  SV103    Unit of Measure Code: ‘UN’ Units
  SV104    Service Unit Count: 1
  SV107-01 1st Diagnosis Code Pointer: 1
   Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
      Date Time Period : 20120124
  Service Line Number 2: LX*2 
   Professional Service Line Item Details: SV1*HC:87046*15*UN*1***1:2:3:4
  SV101-01 Procedure Code Qualifier: ‘HC’ HCPCS
  SV101-02 Procedure Code: 87046
  SV102    Procedure Amount:  $15
  SV103    Unit of Measure Code: ‘UN’ Units
  SV104    Service Unit Count: 1
  SV107-01 1st Diagnosis Code Pointer: 1
  SV107-02 2nd Diagnosis Code Pointer: 2
  SV107-03 3rd Diagnosis Code Pointer: 3
  SV107-04 4th Diagnosis Code Pointer: 4
   Date or Time or Period: DTP*472*D8*20120124
      Date/Time Qualifier : ’472′ Service
      Date Time Period Format Qualifier : Date Expressed in Format CCYYMMDD
      Date Time Period : 20120124

837 Deciphering Raw Data 2420C

LOOP 2420C SERVICE FACILITY LOCATION NAME

       Billing Provider Information: NM1*77*2*BEST LAB COMPANY*****XX*1124157821
       NM101    Entity Identifier Code : Service Location “77″
       NM102    Entity Type Qualifier : Non-Person Entity “2″
       NM103    Organization Name : BEST LAB COMPANY
       NM108    Identification Code Qualifier : National Provider Identifier “XX”
       NM109    NPI: 1134125736
        Service Facility Address: N3*505 Main Street
        N301     Street Address: 505 Main Street
        Billing Provider City, State, ZIP Code: N4*ANAHEIM*CA*92802
        N401     City: ANAHEIM
        N402     State: CA
        N403     Zip: 92802

New 5 Jems in C# 5.0

 

 

Binding Operators

Binding Operators may be C# 5.0. The support for Binding on .NET objects is awesome. I came to know this from Chris on his post where he speaks how Binding operators looked like long ago. The Delphi assignment operator := is now being used for this purpose. :=: would be used for two way binding. Thus:

comboBox1.Text :=: textBox1.Text; 
 
 means there would be two way binding between the properties so that when ComboBox1.Text changes its Text, it will automatically change the value of Textbox1.Text. Binding is actually not a new thing to the system. In WPF, we already have Binding in place, but for that we need the properties to have implemented from INotifyPropertyChanged. So it is not in the language, the WPF objects are doing this internally by handling the PropertyChanged event on the object. But if that is included as an operator, it would be a cool feature to add on.

Support for Dynamic to the Compiler

Another important candidate for C# 5.0 would be the support for dynamic objects to the compiler itself. There are quite a few occasions where we already did face the flavor of Dynamic behavior of object. You can now defer the determination of type for the object to runtime using the keyword dynamic which is a compile time dynamic while runtime static. The introduction of Expression Trees also defers the compilation of an expression at runtime. You can create objects dynamically at runtime using either inheriting from DynamicObject (which is very easy to do) or by using CodeDom to compile a code at runtime and run the code using reflection. But what if these things are supported by the compiler itself.
As pointed out by Magnus in his post, The future of C# 4.0 and then 5.0, he clearly pointed out what the next version of C# would add up. The compiler must be supporting quite a number of APIs which lets you tweak your code to generate and compile the code at runtime.
But these are not the end of C# 5.0. People all around the globe are putting efforts to make a Wishlist on C# 5.0. A few of those might be:
Pavel's Wishlist on C# 5.0 where he specified quite a number of interesting specs on C# 5.0 but will it be all.
Probably if you ask me what would be your own language features which you like to see, I may name quite a few which I miss:

1. Support for parametrized constructors in Generics.

Yes. it would be nice to have this option in. As we have:

public class T MyClass : T: class, new()

//we might have 
public class T MyClass : T:class, new(int)



This might need adjustment to the compiler. I don't know if it is possible or not. But I definitely miss this in C#.

2. Support for WeakDelegate or WeakEvents

WeakReference, as I have discussed already in my blog or you come across it somewhere else, gives you a tweak to GC. It lets you refer to an object weakly while the GC may still collect it in the process. Thomas, rightly identified that WeakDelegate does not work now. You cannot have WeakDelegate defined in your scope.

3. Better treatment for Null

Working with Null has always been a problem for me. We have to treat nulls separately because there is no type associated with Nulls. With the introduction of Nullables around or Null coalesce operators, still there is scope of improving the Null treatment in the language. Say for instance,


int x? = null;
int y? = x + 40;
 
It was introduced by Earlz in his post. Really looks nice, huh.

4. Smart Case support

Yes, Switch - Case could allow expressions. While working with it, I miss it very often. Just like what Charles pointed out, I agree with him totally. I would like to have the option to specify:


switch(myobj)
{
   case string.IsNullorEmpty(myotherobj):
                  .....
   case myotherobj.Trim().Lower:
         ....
}
 

5. Extension properties

Just as we support extension methods, we could also have extension properties which could probably be used from Extension methods only. It is nice to have in certain cases.

[Associate(string)]
public static int MyExtensionProperty { get;set;}
 
Something like this might come in very handy at times. Probably some other syntax than Attribute Associate would be more fruitful.
Finally, I would like to see your feedback on the topic. Any other things which you miss? You can point them out to me.
Thanks for reading.
 

 

Checking for existing username without page refresh in ASP.NET MVC (Remote validation)

In this article, we are going to learn a frequently used functionality in any web application where at the time of registration it is checked for the existing username in the database and user is alerted that this username already exists. There are few ways to do that and one of them is by using the Remote Validation in ASP.NET MVC. This article describes how to use Remote Validations in ASP.NET MVC to achieve this task.


Introduction


Remote Validation is a nice validation feature available in ASP.NET MVC. It is client side validation technique that invokes action method on the server to perform validation for a particular data.

This validation is completely different from the normal model validation where all the properties of the model is validated. In this type of validation, only a specific model property is validated. As part of this process, an AJAX request is made to the server to validate the data that has been requested. If it exists, a validation error is shown to the user. All this happens in the background, user doesn't have to click any button to perform this validation. As and when user keeps typing, this validation is performed and result is shown to the user.

Add caption



How to achieve Remote Validation?

To achieve Remote Validation, we need to do a few changes in our Model class. Below is my changed model class.
 
public class PersonalDetail
    {
        [Key]
        [DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)]
        public int AutoId { get; set; }
        [StringLength(20, MinimumLength = 4, ErrorMessage = "Must be at least 4 characters long.")]
        [Remote("CheckForDuplication", "Validation")]
        public string FirstName { get; set; }
        
        public int Age { get; set; }
    }
 
Notice the FirstName property and its attributes (Please note that despite my Property name is FirstName, I am treating it as UserName to bring it to this context).
 The first attribute is to specify the maximum and minimum number of 
characters accepted in this field and the second attribute is the one we
 are talking about here. This specifies that Remote validation will be 
performed on this field and its parameter specifies that which action 
method of which controller will be used to generate URL to be called 
from JavaScript validation library.
 
 
 


My view page (.cshtml) code looks like this, there is no major changes in this because of Remote Validation.

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>PersonalDetail</legend>

        <div class="editor-label">
            Username
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Age)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Age)
            @Html.ValidationMessageFor(model => model.Age)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
In the Controller, we have following methods
        public ActionResult RemoteValidation(PersonalDetail pd)
        {
            return View(pd);
        }

        public JsonResult CheckForDuplication(string FirstName)
        {
            var data = db.PersonalDetails.Where(p => p.FirstName.Equals(FirstName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();

            if (data != null)
            {
                return Json("Sorry, this name already exists", JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json(true, JsonRequestBehavior.AllowGet); 
            }
        }
The first method simply, returns the RemoteValidation view with my model.

The second method gets called when user starts writing characters in the UserName text box (in my case the model property name is FirstName but I am calling this as UserName). However this method is not get called unless user enters 4 characters, this happens because of StringLength attribute on this field.


When user writes at least 4 characters, the second method gets called and in this method we are validating the FirstName in the database and if it exists; returning the error message.


If the UserName (in my case FirstName field of the database) doesn't exists, second method returns true and the validation passes.


Note that all these steps are performed using jQuery AJAX and no complete post back request is sent to the server so all these processes looks very smooth and interactive.

Conclusion

Remote Validation helps us giving quick feedback to the user for the availability of UserName (in this case FirstName) however it should be used cautiously as every key stroke in the UserName textbox after 4 characters will call the Validation method causing consumption of more bandwidth and resources of the server.

Hope this article was useful. 

Thanks for reading. Do share your comment or feedback.