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: P3-0005, P3-0036, P3-0072, P3-0116, P3-0156, P3-0185. 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 document ID=P3-9999 (null if not exists). Keys only records,total_mg,missing.

Need extract:
P3-0005: line0006? Let's map:
行0001 P3-0000 code b6ac0b1e3105 value 345
0002 P3-0001 d763ff1b5ff2 589
0003 P3-0002 36864228436f 308
0004 P3-0003 37f3055a41aa 372
0005 P3-0004 cbee8642edfa 513
0006 P3-0005 5005e2e37b02 365
So first: id P3-0005, code 5005e2e37b02, value_mg 365.

P3-0036: line0037? 行0037: P3-0036; code 5a5e7d96dff7; value 226. Yes.

P3-0072: line0073: P3-0072; code fa2abf54f886; value 759.

P3-0116: line0117: P3-0116; code 99c846b00eb2; value 408.

P3-0156: line0157: P3-0156; code 7d24e431678e; value 200.

P3-0185: line0186: P3-0185; code a3f0e0065a7d; value 537.

records array order as specified. total_mg = 1st + 3rd + 6th values = 365 + 759 + 537 = 1661? 365+759=1124; +537=1661.

missing: P3-9999 not present -> null.

Need output JSON object only with keys records,total_mg,missing. Ensure value_mg numeric? likely integer. code string. JSON valid. No fences.

Double-check IDs:
P3-0036 line0037: 資料ID=P3-0036; 照合記号=5a5e7d96dff7; 測定値=226 mg. yes.
P3-0072 line0073: P3-0072; fa2abf54f886; 759. yes.
P3-0116 line0117: P3-0116; 99c846b00eb2; 408. yes.
P3-0156 line0157: P3-0156; 7d24e431678e; 200. yes.
P3-0185 line0186: P3-0185; a3f0e0065a7d; 537. yes.

Need maybe records elements are objects? "recordsはid,code,value_mgの6要素配列" means records is array of 6 elements, each with id, code, value_mg. Could be array of objects. Yes.

Final:
{"records":[{"id":"P3-0005","code":"5005e2e37b02","value_mg":365},...],"total_mg":1661,"missing":null}

Ensure no extra.
