We need answer user's request. Need produce final JSON only, no markdown. Need parse data and compute.

User Japanese: fictional measurement records. Need extract specified IDs in order: P2-0002, P2-0018, P2-0036, P2-0057, P2-0077, P2-0092. records is array of 6 elements with id, code, value_mg. total_mg is sum of values at 1st, 3rd, 6th elements of array. missing is measurement value for ID=P2-9999 (null if absent). Keys only records,total_mg,missing.

Need extract:
P2-0002: row0003 code c4ece5ece84c value 388
P2-0018: row0019 code 520ed95ea275 value 388
P2-0036: row0037 code 97a6c36c0eb3 value 961
P2-0057: row0058 code c26a0ace6116 value 189
P2-0077: row0078 code f750f4934907 value 721
P2-0092: row0093 code fb56105f303e value 798

Check IDs: row0093 is P2-0092 yes.

total_mg = 1st + 3rd + 6th = 388 + 961 + 798 = 2147? 388+961=1349; +798=2147.

missing P2-9999 absent -> null.

Output JSON object: {"records":[{"id":"P2-0002","code":"c4ece5ece84c","value_mg":388},...],"total_mg":2147,"missing":null}

Need ensure only keys records,total_mg,missing. No fences.
