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: P4-0009, P4-0060, P4-0121, P4-0194, P4-0261, P4-0309. 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=P4-9999 (null if absent). Keys only records,total_mg,missing.

Need extract:
P4-0009: line0010: 照合記号=7ed13a79f7ef; 測定値=168 mg.
P4-0060: line0061: 資料ID=P4-0060; 照合記号=9188772de636; 測定値=148 mg.
P4-0121: line0122: P4-0121; code=24978b3815ae; value=230 mg.
P4-0194: line0195: P4-0194; code=3ff14169240e; value=705 mg.
P4-0261: line0262: P4-0261; code=f7d04b4b0766; value=264 mg.
P4-0309: line0310: P4-0309; code=60359a9d5dda; value=332 mg.

records array order as specified. total_mg = 1st + 3rd + 6th values = 168 + 230 + 332 = 730. Check: 168+230=398; +332=730.
missing: P4-9999 not present -> null.

Need output JSON object with keys records,total_mg,missing. records elements likely objects with keys id, code, value_mg. Ensure numbers not strings? value_mg numeric. code string. id string.

Final:
{"records":[{"id":"P4-0009","code":"7ed13a79f7ef","value_mg":168},...],"total_mg":730,"missing":null}

Need no markdown. Ensure valid JSON.
