Care plans
Your plans
{plansSummary(active)}
{active.length > 0 ? (
active.map(planCard)
) : loading ? (
) : wholeRecord.active.length === 0 && (
{/* THE DECK'S COPY, AND THE FIRST SENTENCE IS THE ONE DOING THE WORK. Every other list in
this portal is one a patient can add to, so an empty one here invites them to look for
the button that starts a care plan - and there is none, because a plan is written by a
clinician.
THE SECOND SENTENCE USED TO NAME THE WRONG TRIGGER: "When a practice starts one it
appears here". A plan is invisible until the clinician who wrote it gives it to the
patient, so a patient with two drafts on their record read that a practice had not
started one. It mirrors the clinician's own control, which reads "Give it to the
patient", and it asserts nothing: telling them a plan exists is the disclosure the draft
rule is there to prevent. */}
)}
{finished.length > 0 && (
<>
Finished
{finished.map(planCard)}
>
)}
{/* The qualifier that used to sit here - "across every practice" - said in the heading what
every row below it already says, since each one names the practice it comes from. */}
Your clinical care team
{/* Loading is not the same as nobody, and the fetch polls - saying "no care team yet"
while it is still arriving is a claim about the patient's practice that is untrue. */}
{teams.error ? (
Your clinical care team could not be loaded just now. Please try again.
) : team.length === 0 && loading ? (
) : team.length > 0 ? (
team.map((member) =>
)
) : (
)}