Most of the time, the DRG for a claim that is submitted for payment is found using a "grouper" program based on ICD diagnoses, procedures, age, sex, discharge status and the presence of complications or comorbidities. These programs are proprietary.
Here is a website that provides a demo of use of a grouper program to find a DRG.
It is possible to find a DRG for a diagnosis (e.g., F40.228) without one of these programs. It requires some knowledge of the structure of the ICD-10, often knowledge of medicine, and, in many cases, knowledge of some esoteric coding rules.
Here is a (free) workaround that is a bit of a “brute force” solution for your simple problem—find a DRG for ICD-10 code F40.228 as a principal diagnosis.
This ICD-10 code is described in the ICD-10 code book as:
F40.228 Other natural environment type phobia
I can determine this using a (free) online look-up.
At the same (free) website, there is a DRG look-up:
I scroll down this list looking for a DRG-description that describes a condition that is a phobia. Because of my knowledge of medicine, I choose the DRG category “Neurosis other than depressive.” This is DRG 882. I open up the 882 DRG link and yes, there is the ICD-10 code F40.228. So the DRG for ICD-10 F40.228 as the principal diagnosis is 882.
For many diagnoses, one needs to find the DRG descriptor to which the diagnosis maps and also figure out whether there are associated major complications or co-morbidities (MCC) or complications or co-morbidities (CC) because having an associated MCC and/or CC changes the DRG.
For example, the DRG for the ICD-10 diagnosis code:
I63.011 Cerebral infarction due to thrombosis of right vertebral artery
DRG 061 if there is an associated major complication or co-morbidity (MCC)
DRG 062 if there is a complication or co-morbidity (CC)
DRG 063 if there is neither a major complication or co-morbidity (MCC) nor a complication or co-morbidity (CC)
The rules that determine whether to assign an MCC or CC to a diagnosis are complex. They are described here.