We need answer user's request. Need output JSON object only, no markdown. Need parse data. User Japanese: extract specified IDs in order: P1-0001, P1-0008, P1-0017, P1-0028, P1-0038, P1-0045. 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 P1-9999 if not exists null. Keys only records,total_mg,missing.

Need extract:
P1-0001: line0002 code=0d779aa92c4b value=411
P1-0008: line0009 code=6145b5511a6d value=869
P1-0017: line0018 code=7f33f46e3c72 value=191
P1-0028: line0029 code=1ce11754e79b value=633
P1-0038: line0039 code=75a4dd4130f3 value=686
P1-0045: line0046 code=73414e4bb5e3 value=366

total_mg = 1st + 3rd + 6th = 411 + 191 + 366 = 968. Check: 411+191=602; +366=968.
missing P1-9999 not present -> null.

Need JSON object: {"records":[{"id":"P1-0001","code":"0d779aa92c4b","value_mg":411},...],"total_mg":968,"missing":null}
Ensure only JSON. No fences.
