Function: profileQuirkApplied()
profileQuirkApplied(
original,profileName):CcdaWarning
Build a PROFILE_QUIRK_APPLIED warning, the downgraded form an active
CcdaProfile produces from a deviation it expects. The original
warning is not dropped: its code moves to toleratedCode, the deviation
is re-badged PROFILE_QUIRK_APPLIED, expected is set, and the tolerating
profile is named, so a consumer can filter known, grounded noise while the
fact of the deviation, and where it was, survive. A profile can only ever
reach this path for a non-safety-critical code (enforced at profile-
definition time); safety-critical warnings can never be tolerated. The
original message is preserved so the specifics (which OID, which LOINC)
are not lost, it is PHI-free by the same construction as every other factory.
Parameters
original
profileName
string
Returns
Example
import { profileQuirkApplied, deprecatedLoinc } from "@cosyte/ccda";
const original = deprecatedLoinc({ path: "code" }, "41909-3");
const w = profileQuirkApplied(original, "smartScorecard");