appliedChanges: saved.unappliedChanges: not saved. ItsstatusisREJECTED(fix the input) orAMBIGUOUS(pick an option).
unappliedChanges means everything you sent took effect.
A change
Answering a choice
When a name fits several things (a drug, an allergen, a pharmacy), Photon doesn’t guess. It returns anAMBIGUOUS change, saves nothing, and lists the candidates as options:
operation mutation, set the argument path to value, then resend. Here that means resending with treatment: { id: "med_01M3D93NFGCZJPQ3XW3AF7578G" } in place of the name.
Who picks: pick automatically only when there’s a single option that matched exactly (EXACT_NAME_MATCH or RXNORM_CODE_MATCH). Otherwise, show the options to a person, or apply your own deterministic rule. Prescribe and the JavaScript client follow this same rule.
Rules
- A call is all or nothing. If any input is
BLOCKING, nothing is saved. Inputs that were fine come backREJECTED, with areasonpointing at the input that failed. Fix that input and resend the whole call. - The record can be null. When nothing was saved,
patient,prescriptionorordermay benull. The cause is inunappliedChanges. - Applied changes can carry advice. An
APPLIEDchange withADVISORYseverity was saved, but its options suggest something better, such as a more specific diagnosis code. - Ambiguous records are separate. When Photon can’t tell which existing patient, draft or order you meant, the whole result is an
Ambiguous…Matchwithcandidates, not a change. Resend with the candidate’sid.