ICD code P71.2 – Hypomagnesemia of newborn
Billable Code Specific Code
P71.2 is the billable ICD-10-CM code for neonatal hypomagnesemia, a low serum magnesium level that originates in the first 28 days of life.
It sits in Chapter 16 of ICD-10-CM (Certain Conditions Originating in the Perinatal Period) and is valid on professional and institutional claims. It shares category P71 with the hypocalcemia codes P71.0 and P71.1, which capture calcium rather than magnesium deficiency. Hypomagnesemia that does not originate in the perinatal period takes E83.42 instead.
- Chapter
- P00-P96 Certain conditions originating in the perinatal period
- Category
- P71 Transitory neonatal disorders of calcium and magnesium metabolism
- Group
- P71.2 Neonatal hypomagnesemia
- Billable
- Yes
- Code also known as
- neonatal hypomagnesaemia, neonatal low magnesium, perinatal magnesium deficiency, newborn magnesium disorder
Let Pabau's smart automation suggest the right codes, reduce claim denials, and keep your practice compliant—effortlessly.
- AI-powered code suggestions
- Real-time compliance checks
- Faster claims, fewer denials
Automate repetitive tasks and focus on what matters most—your patients.
Reduce coding errors and ensure compliance with the latest regulations.
Clean claims, fewer denials, and faster reimbursements.
Powerful insights and reporting to help your practice thrive.
HIPAA compliant SOC 2 certified GDPR-compliant Trusted by 4,000+ clinics worldwide
Key takeaways
P71.2 codes neonatal hypomagnesemia, a magnesium deficiency that originates in the first 28 days of life.
Hypomagnesemia that does not originate in the perinatal period takes E83.42 instead.
Coding P71.2 needs provider attestation plus a lab value confirming low serum magnesium.
The lab result, not the presentation, decides between P71.2 and the hypocalcemia codes P71.0 and P71.1.
Pabau’s claims management software helps billing teams flag age-edit conflicts and track P71.2 denials.
ICD-10 Code P71.2: Definition and code details
ICD-10 Code P71.2 is the ICD-10-CM diagnosis code for neonatal hypomagnesemia, also described as hypomagnesemia of newborn. It covers abnormally low serum magnesium that originates in an infant’s first 28 days of life.
The code was adopted with the US transition to ICD-10-CM in October 2015. It has stayed active and billable in every fiscal year update since, as the CDC/NCHS ICD-10-CM web tool shows.
Unlike ICD-10 Code P71.1 (other neonatal hypocalcemia), P71.2 specifically identifies magnesium as the deficient mineral. The distinction shapes medical necessity documentation and DRG grouping on inpatient neonatal claims. It also matters for payer edits that request lab evidence for mineral-specific diagnoses.
P71.2 code details at a glance
Clinical definition: Hypomagnesemia of the newborn
Hypomagnesemia of the newborn is a transient metabolic disorder in which serum magnesium drops below the normal neonatal range in the first 28 days. Thresholds vary by institution and guideline. Most neonatal units treat a serum magnesium below roughly 0.6–0.7 mmol/L (1.5–1.7 mg/dL) as the trigger for clinical concern. Follow AAP guidance and local policy rather than a single cut-off value.
Common causes documented in NICU and special care nursery records include:
- Maternal diabetes mellitus (most common cause; maternal hyperglycemia suppresses placental magnesium transfer)
- Prematurity (immature renal tubular reabsorption of magnesium)
- Intestinal malabsorption or short gut in the neonate
- Hypoparathyroidism-related magnesium wasting
- Inadequate parenteral nutrition magnesium content in the NICU
Clinical signs include jitteriness, tremors, irritability, apnea, and, in severe cases, neonatal tetany or seizures. These presentations overlap with hypocalcemia. Before assigning P71.2 rather than P71.0 or P71.1, a coder needs the lab report showing magnesium as the primary deficiency.
What P71.2 includes and what it excludes
P71.2 includes hypomagnesemia that originates in the neonatal period, whatever the cause, provided the diagnosing provider has documented it. The code also applies when hypomagnesemia is secondary to another neonatal condition, such as respiratory distress or sepsis. The provider still has to document and attest to the magnesium deficiency.
Key exclusions to know:
- E83.42 (Hypomagnesemia): This is the correct code for hypomagnesemia that does not originate in the perinatal period. Using E83.42 for a 10-day-old infant is a classification error and will trigger an age-edit denial.
- Conditions arising after day 27: A magnesium deficiency that first develops after the perinatal period takes a non-perinatal code. A perinatal-origin condition keeps its Chapter 16 code even after day 28.
- P71.1 and P71.0: These cover calcium deficiency (hypocalcemia), not magnesium. Assigning P71.2 when calcium is the primary deficiency is a clinical coding error.
There are no “code also” or “code first” instructions attached to P71.2 in the ICD-10-CM tabular. When hypomagnesemia coexists with another neonatal condition driving the encounter, standard sequencing rules (UHDDS and ICD-10-CM Chapter 16 guidelines) govern which code is listed first.
The P71 category: Perinatal calcium and magnesium disorders
P71.2 belongs to category P71, which covers all transitory neonatal disorders of calcium and magnesium metabolism. The codes look similar, yet each captures a clinically and biochemically distinct condition, so NICU and pediatric inpatient coders need to read them carefully.
The WHO ICD-10 browser shows the international classification hierarchy. The US clinical modification is maintained by the CDC/NCHS.
Codes most often confused with P71.2
Four codes generate the majority of P71.2 miscoding situations. The AAPC ICD-10-CM lookup is a useful cross-reference tool, but the clinical decision rule below is what drives accurate selection.
Decision rule: use P71.2 only when all three of these hold:
- The hypomagnesemia originated within the first 28 days of life.
- The diagnosing provider has attested to hypomagnesemia in the medical record.
- Lab results confirm low serum magnesium as the primary mineral deficiency.
The flow below runs the same checks in the order a coder meets them.

How to use P71.2 as principal vs secondary diagnosis
Sequencing P71.2 correctly depends on what brought the infant to the encounter or drove the inpatient stay. Apply the UHDDS definition of principal diagnosis: the condition established after study to be chiefly responsible for occasioning admission.
- P71.2 as principal diagnosis: Hypomagnesemia is the reason the neonate was admitted or the primary reason for the NICU encounter. Example: a full-term infant admitted to the special care nursery solely for management of documented low serum magnesium with jitteriness.
- P71.2 as secondary (additional) diagnosis: Hypomagnesemia is documented and treated but is a comorbidity alongside a more acute condition. Common principal diagnoses here are prematurity (P07.xx), neonatal sepsis (P36.xx), and P22.0 for respiratory distress syndrome. P71.2 is then coded additionally.
- Chapter 16 sequencing note: ICD-10-CM guidelines allow Chapter 16 codes throughout the patient’s life if the condition originated in the perinatal period. This matters if an infant is discharged and later readmitted for the same condition, even after day 28.
Pro Tip
When the clinical record shows both hypocalcemia and hypomagnesemia, query the provider to confirm which mineral deficiency is primary before sequencing P71.1 and P71.2 together. AHA Coding Clinic is the authoritative source for P71.x sequencing disputes. Always document physician responses to queries before assigning a code.
Documentation requirements for P71.2
Assigning P71.2 requires four elements in the medical record. Missing any one of them is a common reason payers and auditors challenge the code.
- Provider attestation: The diagnosing physician, neonatologist, or nurse practitioner must explicitly document “hypomagnesemia” or “low serum magnesium” as a clinical diagnosis. A lab value alone, without provider documentation linking it to a diagnosis, is insufficient for coding purposes under ICD-10-CM guidelines.
- Supporting lab value: A serum magnesium result below the institution’s defined neonatal threshold must appear in the record. Document the value, units, and date of the result.
- Onset within the neonatal period: The record must confirm the patient’s date of birth and that the condition originated before day 28 of life. Age-edit software at payers checks this automatically.
- Treatment or clinical management: Record magnesium supplementation (oral or IV), monitoring frequency, or clinical response. That strengthens the medical necessity case and shows the diagnosis was managed, not an incidental finding.
If any element is unclear or absent, the coding and documentation specialist should issue a physician query before submitting the claim. Assuming a diagnosis from a lab value without provider attestation is a compliance risk. Consistent documentation habits also support medical billing compliance across the full neonatal episode of care.
Payer requirements and reimbursement considerations
Medicaid and Medicare claims carrying P71.2 follow the standard Chapter 16 medical necessity framework. The CMS ICD-10 codes page is the reference for current code validity and any national coverage determination context. Key payer considerations:
- Age edits: Most payers have automated edits that flag Chapter 16 diagnoses for patients recorded as 28 days of age or older. Confirm the date-of-birth and admission date are entered consistently across the claim.
- DRG impact: On inpatient neonatal claims, P71.2 as a secondary diagnosis can affect DRG assignment and reimbursement when it qualifies as a complication or comorbidity. DRG weights change annually with CMS IPPS rule updates; verify current figures rather than relying on prior-year values.
- Commercial payers and LCD: There are no national coverage determinations (NCDs) specific to P71.2. Local coverage determination (LCD) applicability varies by jurisdiction and payer. Verify current policies directly, because payer requirements change.
- Prior authorization: NICU admissions often carry a blanket prior-authorization requirement. P71.2 itself does not trigger a specific PA requirement, but it must be supported in the clinical documentation submitted with any authorization request.
Common P71.2 claim denial reasons and how to avoid them
P71.2 denials cluster around a small set of preventable errors. Understanding the pattern helps coding teams build front-end edits that stop these before submission. Denial management workflows track these by denial code, so teams can prioritize the highest-volume root causes.
Track denials by claim adjustment reason code (CARC) alongside the ICD-10 code, and systemic patterns surface before they inflate denial rates. A registrar who keeps entering the wrong DOB format is a typical example. A guide to denial codes maps payer CARC codes to these root-cause categories. Submitting each clean claim right the first time is the most reliable way to cut avoidable P71.2 rejections.
Pro Tip
Build a front-end claim edit that routes any Chapter 16 (P00-P96) code on a patient 28 days or older to a coder for review. That one rule catches the two most common P71.2 denial causes, wrong code family and age conflict, before the claim reaches the clearinghouse.
How claims management software prevents P71.2 denials
Many P71.2 denials surface weeks after submission, when a payer flags a DOB mismatch or asks for the missing magnesium result. By then, the coder has to rebuild the case from the chart and resubmit.
Pabau, the practice management platform we build, moves those checks ahead of submission. Its claims software for coders sends US claims through the Claim.MD clearinghouse, which validates ICD-10-CM codes against payer edits. Age conflicts and invalid codes come back as errors before a denial is issued.
Denials that do get through are tracked by code and reason. So the team can see whether P71.2 problems start in documentation, sequencing, or registration, and fix the source rather than the single claim.
Reduce neonatal claim denials with smarter billing workflows
Pabau’s claims management software helps pediatric and neonatal billing teams catch age-edit conflicts, sequencing errors, and missing documentation before a claim leaves the practice.
Conclusion
P71.2 is a narrow code, and getting it right rarely depends on the code itself. It depends on the chart: a documented diagnosis, a magnesium value, and an onset inside the perinatal period.
Check those three items before the claim leaves, and the preventable denials in the table above stop reaching your queue. The trade-off is a few minutes of review on each neonatal claim, which costs far less than an appeal.
Book a demo to see how Pabau runs those checks on neonatal claims before they reach the payer.
Continue your research
Want to understand the full revenue cycle context for P71.2 claims? What is revenue cycle management walks through each stage from coding to payment posting.
Coding a magnesium deficiency in an older patient? ICD-10 code E61.2 covers magnesium deficiency outside the newborn chapter.
Is the newborn presenting with seizures? ICD-10 code P90 covers convulsions of newborn, one of the signs described above.
Frequently asked questions
What does ICD-10 Code P71.2 mean?
ICD-10 Code P71.2 is the billable diagnosis code for neonatal hypomagnesemia. It means a documented low serum magnesium level that originates in an infant’s first 28 days of life. It is classified in Chapter 16 of ICD-10-CM (Certain Conditions Originating in the Perinatal Period) and is distinct from calcium deficiency codes P71.0 and P71.1.
How is P71.2 different from P71.1?
P71.2 codes a magnesium deficiency (hypomagnesemia) while P71.1 codes a calcium deficiency (other neonatal hypocalcemia). Both occur in neonates within the first 28 days, but they are biochemically distinct conditions. The lab result, not the clinical presentation alone, determines which code applies. Confirm whether serum magnesium or serum calcium is the primary abnormal value before assigning either code.
Does P71.2 require a confirmatory lab value for billing?
Yes, in practice. ICD-10-CM coding guidelines require a provider to document and attest to the diagnosis. When P71.2 appears on a claim, payers routinely request records showing a serum magnesium result below the neonatal threshold. A lab value without provider attestation, or attestation without a lab value, leaves the claim open to a denial or audit finding.
Is P71.2 a principal or secondary diagnosis code?
P71.2 can be either, depending on what drove the encounter. It is the principal diagnosis when hypomagnesemia is the condition chiefly responsible for the admission. It is a secondary (additional) diagnosis when it is documented and managed alongside a more acute condition. Prematurity or respiratory distress driving the admission is the typical case. Apply UHDDS sequencing rules to determine the correct order.
When should E83.42 be used instead of P71.2?
E83.42 (Hypomagnesemia) is correct when the condition did not originate in the perinatal period, which usually means a patient 28 days or older. P71.2 applies when the deficiency originates within days 0-27. Using E83.42 for a neonate within the first 28 days is a classification error and will trigger an age-edit denial from most payers.