健康計劃處方電子郵件 plan-prescription

設定檔包含健康計畫,而每個計畫都包含處方。 處方有各種狀態,例如「就緒」、「召回」或「已接受」。

在此使用案例中,我們希望傳送一封電子郵件給每個設定檔,包括所有準備好取用或召回的處方。 按一下底下的每個標籤,以取得關於用於實作此使用案例的語法的詳細資訊。

已轉譯的訊息

嗨,John Doe,

以下是已準備好取貨或已被召回的處方:

健康情況計畫A

  • 處方識別碼: pres1
    名稱: 藥物A
    狀態: 就緒
  • 處方識別碼: pres2
    名稱: 藥物B
    狀態: 回收

健康情況計畫B

  • 處方識別碼: pres4
    名稱: 藥物D
    狀態: 就緒
HTML範本
code language-html
<p>Hi {{profile.person.firstName}} {{profile.person.lastName}},</p>
<p>Here are the prescriptions that are either ready for pick up or have been recalled:</p>
{{#each profile.plans as |plan|}}
<h3>{{plan.name}}</h3>
<ul>
   {{#each plan.prescriptions as |prescription|}}
   {%#if prescription.state = "ready" or prescription.state = "recall"%}
   <li>
      <strong>Prescription ID:</strong> {{prescription.prescription_id}}<br>
      <strong>Name:</strong> {{prescription.name}}<br>
      <strong>State:</strong> {{prescription.state}}
   </li>
   {%/if%}
   {{/each}}
</ul>
{{/each}}
設定檔資料
code language-javascript
{
  "profile": {
    "person": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "plans": [
      {
        "planId": "plan1",
        "name": "Health Plan A",
        "prescriptions": [
          {
            "prescription_id": "pres1",
            "name": "Medication A",
            "state": "ready"
          },
          {
            "prescription_id": "pres2",
            "name": "Medication B",
            "state": "recall"
          }
        ]
      },
      {
        "planId": "plan2",
        "name": "Health Plan B",
        "prescriptions": [
          {
            "prescription_id": "pres3",
            "name": "Medication C",
            "state": "picked up"
          },
          {
            "prescription_id": "pres4",
            "name": "Medication D",
            "state": "ready"
          }
        ]
      }
    ]
  }
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76