Extract values:
P2-0002: code c4ece5ece84c, 388
P2-0018: 520ed95ea275, 388
P2-0036: 97a6c36c0eb3, 961
P2-0057: c26a0ace6116, 189
P2-0077: f750f4934907, 721
P2-0092: fb56105f303e, 798

total_mg = 1st, 3rd, 6th values: 388 + 961 + 798 = 2147.

missing: P2-9999 not present → null.