Claim processing is one of the most popular areas where rule-based business decision demonstrates their power, whether in healthcare, insurance, or any other finance and accounting service. In all these industries, handling claims plays a significant role in ensuring customer satisfaction. Within the claim handling process, the verification and validation of codes are critical. This part of the process changes everything about the claim status. Approval, rejection, exceptions, requirements for manual operation, and many other things depend on the identification, verification and validation of coding specified in the claim.

The verification requirements of coding in claims may change from industry to industry and in different use cases. However, in all of them several core aspects of verification remain important:

  • Accuracy
  • Fast response
  • Auditibility

The codes in claims represent what is done in the particular claim, for instance in a medical claims they represent, identify and group diseases, disorders, symptoms, etc. related to patients.

Medical Coding

A vital part of medical claim processing is to ensure that the codes provided to the payer are valid and their combination of codes are valid as well and there are no conflicting diagnoses. This can be challenging, especially when dealing with a list of around 70,000 combinations of diagnosis codes that cannot be reported together, according to the organization's rules.

A healthcare company may need a decision service that can receive input in the form of a set of codes and identify any incompatible diagnosis code combinations. This decision service should use Decision-Integrated Monadic Query Language (DIMIQ), to handle the data through the Medical Claim Processing decision model. The decision service can generate messages such as “Diagnosis code1 cannot report along with code2” for each matching pair, ensuring that the claim is processed accurately and efficiently.

Building a Decision Service for Diagnosis Codes Validation

In the context of claim validation, a decision service can be used to validate the claims by comparing the input diagnosis codes with a set of predefined rules.
The decision service uses DIMIQ to index the code combinations as key-value pairs. The indexed table can be created and stored as a lookup table for efficient searching of matching combinations of the diagnosis codes.
Diagnosis Codes Validation
If the input diagnosis codes match any of the incompatible code pairs in the lookup table, the decision service can produce an error notification, indicating that the claim is not valid. By handling the ICD-10 code combinations in this way, the decision service can efficiently validate the claims while maintaining transparency and explainability in the decision-making process.
Once the indexed table is created, it can be stored as a lookup table and that can be used to search whether the given input Diagnosis Codes have any matching combinations in the lookup table. If the input Diagnosis codes match the incompatible code pairs in the lookup table, it should validate the claim by producing the errors.
To explore more about this project, visit FlexRule Resource Hub.

Book a Custom Demo

First or last name is too short

Validate Diagnosis Codes

Once the lookup table is ready, the input diagnosis codes will be passed to a boxed expression which returns a Boolean value to check whether the lookup table contains any matching code pairs.

To define the business rules, we use a “Decision Table” and the defined boxed expression will be called inside the DT.
The diagnosis code combinations can be varied based on the number of diagnosis codes in the input which results in an increasing number of conditions in the business logic with the number of possible combinations. Each rule that matches the code combination in the lookup table, creates an error saying that the relevant diagnosis code combination cannot be reported together.

Transparency and explainability

A transparent and explainable decision builds trust and ensures ethical and fair decisions are made while reducing the risk of errors and increasing customer satisfaction. The reasoning behind the decision can become part of the response payload, or be stored on the server side. This allows for a detailed view of the logic execution, including the time taken for each decision based on the given diagnosis code inputs.



A critical part of medical claim processing is a validation of medical diagnosis codes to ensure codes are not duplicated, and combinations of them make sense. Additionally, the validation decision should provide a full explanation of why and how a claim has been flagged or rejected because of invalid codes for auditability and compliance purposes. Furthermore, the execution of the decision must be a quick as this is a very common decision among all the other claim processes and medical coding validations.

Published March 23rd, 2023 at 03:40 pm