Context
The one place in and out differ
The Insights contract is “same vocabulary in and out” for almost everything: deductibles, out-of-pocket maximums, in/out/Rx coinsurance, rates (t1_ee…t4_gross), HSA funding (t1_ercdhp…), and all life, disability, stop-loss, and vision metrics carry the same key when you POST a plan and when you read a benchmark back.
The medical service copays (office visits, hospital) and Rx tiers are the exception. On the way in they are componentized, two or three fields per service. The benchmark collapses each service into a single derived key. So the field you write is not the field you read.
These fields are also non-HDHP only. HDHP plans carry no service/Rx design (everything runs against the deductible), so pcp, rx1, and friends appear only for HMO and PPO/POS/EPO plan types.
Step 1
The in → out mapping
Each service is a copay plus a deductible-applies flag on data-in; each Rx tier adds a coinsurance field. On data-out they are one key.
Medical services
| Data-in (you POST) | Data-out (you read) |
|---|---|
| pcp_copay, pcp_ded_apply | pcpPrimary care physician |
| sp_copay, sp_ded_apply | spSpecialist physician |
| er_copay, er_ded_apply | erEmergency room |
| uc_copay, uc_ded_apply | ucUrgent care |
| ip_copay, ip_ded_apply | ipInpatient hospital |
| op_copay, op_ded_apply | opOutpatient hospital |
| lx_copay, lx_ded_apply | lxLab & X-ray |
Prescriptions (retail + mail, per tier)
| Data-in (you POST) | Data-out (you read) |
|---|---|
| rx1_copay, rx1_coin, rx1_ded_apply | rx1Rx tier 1 |
| rx2_copay, rx2_coin, rx2_ded_apply | rx2Rx tier 2 |
| rx3_copay, rx3_coin, rx3_ded_apply | rx3Rx tier 3 |
| rx4_copay, rx4_coin, rx4_ded_apply | rx4Rx tier 4 |
| rx1_mail_copay, rx1_mail_coin, rx1_mail_ded_apply | rx1_mailRx tier 1 (mail) |
| rx2_mail_copay, rx2_mail_coin, rx2_mail_ded_apply | rx2_mailRx tier 2 (mail) |
| rx3_mail_copay, rx3_mail_coin, rx3_mail_ded_apply | rx3_mailRx tier 3 (mail) |
| rx4_mail_copay, rx4_mail_coin, rx4_mail_ded_apply | rx4_mailRx tier 4 (mail) |
Step 2
The stitched p50 string
The derived key’s value is a single display string, stitched by the benchmark from the cost-share descriptor plus the copay amount. There is no _cs/_copay split and no p25/p75 spread, just the market median.
| cost_share descriptor | copay | stitched value |
|---|---|---|
| No Ded. | $30 | "$30 Copay" |
| After Ded. | $40 | "After Ded., $40 Copay" |
| $500 Ded. | 0 | "$500 Ded." |
So the market cut gives you { "p50": "$30 Copay" }; a scored plan adds the plan’s own stitched value: { "plan": "$40 Copay", "p50": "$25 Copay" }.
Step 3
Which fields carry a rank
In a scored plan, only the weighted service/Rx fields contribute to the score, and only those carry a rank (and a weight_percent). The rest are returned for display but are weight-0, so they have no rank. Don’t build a percentile bar for a field that has no rank.
- Ranked (weighted)
- pcp, sp, er, ip, op, rx1, rx2, rx3
- Rank-less (weight-0)
- uc, lx, rx4, rx1_mail, rx2_mail, rx3_mail, rx4_mail
The metric catalog flags the weighted ones, each ranked CPT field carries ranked: true at /insights/metrics/medical, so you can drive this off the catalog rather than hard-coding the list.
Step 4
Reading both faces
Same key, two shapes. Here is pcp (a ranked service) in each face, next to the data-in fields it came from.
{
"pcp_copay": 30,
"pcp_ded_apply": "FALSE" // copay applies, no deductible/coin
}"pcp": { "p50": "$30 Copay" }"pcp": {
"plan": "$40 Copay", // this plan, stitched
"p50": "$25 Copay", // market median, stitched
"rank": "46", // string, masked to ">90"/"<10" at the extremes
"weight_percent": 5 // this field's share of the plan score
}Step 5
Gotchas checklist
- Check 1
Read the derived key, not the input key
Look for
pcp/rx1in the response, neverpcp_copay/rx1_coin. Those exist only on data-in. - Check 2
Expect them only on non-HDHP plan types
HMO and PPO/POS/EPO carry service/Rx design; HDHP does not (it adds HSA funding instead). Absent CPT keys on an HDHP plan are correct, not missing data.
- Check 3
It's one stitched string, in the metrics object
Read the single
p50string (market) orplan+p50strings (scored), there is no_cs/_copaysplit. These fields sit in the samemetrics/positionsobject as the numeric ones; there is no separateplan_design. - Check 4
Only build percentile UI for ranked fields
pcp, sp, er, ip, op, rx1, rx2, rx3carry arank+weight_percentwhen scored. The weight-0 fields are display-only; show the value, skip the bar.