Skip to content
Recipes

New customer feed in one form

Turn your appointments feed into a template made of components, then make each new customer's feed from one form. A component fix later reaches every feed, tested first.

On this page
A new customer feed in one form. Open a template made of a component, make a new customer's feed by filling in one form, then ship a fix to the component and update every feed made from the template, with each feed's tests run first.

Every new customer needs the same feed: scheduling messages in, one appointment row out, tagged with the customer's name and sent to their table. This recipe makes that feed a template once. Each new customer is then one form, and every feed stays linked: a fix to the shared component shows on each feed as Update available, and its tests run before it moves.

Source and destination

flowchart LR
    T[Template: Customer appointments feed] -->|New from template| A[Feed: Demo Health North]
    T -->|New from template| B[Feed: Demo Health South]
    C[Component: SIU appointment row] -.pinned release.-> T
    A --> D[(BigQuery: appointments_north)]
    B --> E[(BigQuery: appointments_south)]
  • Source: HL7v2 SIU^S12-S15 over MLLP, one feed per customer.
  • Destination: one Google BigQuery table per customer.

Build it

1. Start from the built-in feed

In Workflows, Templates, open the card HL7v2 SIU appointments to BigQuery. Its preview says Release 2.0.0 · Built from SIU appointment row 1.0.0 · Asks for table. Choose Use this template: the form asks for a name, the table (prefilled appointments) and a BigQuery profile. Create one feed this way to see it work. The first use installs the component SIU appointment row in the workspace, under Components.

2. Save it as your own template

Open the feed and choose Templates › Save as template. Name it "Customer appointments feed". On its page:

PartSetting
Parameterscustomer (text, required, "Shown in each row"), table (text, required, "The customer's BigQuery table")
StepsThe insert step's table is {{params.table}}. A JavaScript step after the component adds customer: {{params.customer}} to each row (a quoted value).
Built fromSIU appointment row, release 1.0.0
ReleasePublish release… 1.0.0

3. One form per customer

New from template:

Workflow namecustomertableConnection
Appointments: Demo Health NorthDemo Health Northappointments_northDemo BigQuery
Appointments: Demo Health SouthDemo Health Southappointments_southDemo BigQuery

A required value left empty is said in the form before anything is created. Each feed starts as a draft linked to release 1.0.0. Workflows made from it lists both with their values.

4. Try it

Open each feed, send the bundled sample SIU^S12 for TESTPATIENT with Run test, and save it as a test case. The row shows the feed's own customer. Then deploy each feed from Versions.

A fix reaches every feed

  1. On SIU appointment row, fix the mapping (Edit steps) and Publish release… 1.1.0. Its own tests run first. No feed changes yet.
  2. On the template's page, both feeds show Update available: SIU appointment row 1.0.0 → 1.1.0.
  3. Update all (2) runs each feed's test cases against 1.1.0 first. A feed whose test fails is held back, unchanged, with the reason on its row. The others get a new draft, still with their own customer and table.
  4. Deploy each draft from its Versions tab. The update is in the audit log as component.update.

To change the feed itself (a new step, a new parameter), edit the template and publish 1.1.0 of it: the feeds show Update available the same way, and the update keeps each feed's values.

Reference