async function checkIn() {
  return await globals.broker
    .post("/check-in", {
      status: "arrived",
      patient: "Patient/example",
      location: "Location/example",
      appointment: "Appointment/example"
    })
    .then((response) => {
      globals.config(response);
      console.log(JSON.stringify(response.data));
      console.log("\n");

      const appointment = response.data.Appointment.id;
      const encounter = response.data.Encounter.id;
      return { appointment: appointment, encounter: encounter };
    })
    .catch((error) => globals.info(error));
}
/**
 * Send request to check-in endpoint.
 */
Send request to check-in endpoint.
Send request to check - in endpoint .
async function checkIn() {
  return await globals.broker
    .post("/check-in", {
      status: "arrived",
      patient: "Patient/example",
      location: "Location/example",
      appointment: "Appointment/example"
    })
    .then((response) => {
      globals.config(response);
      console.log(JSON.stringify(response.data));
      console.log("\n");
      const appointment = response.data.Appointment.id;
      const encounter = response.data.Encounter.id;
      return { appointment: appointment, encounter: encounter };
    })
    .catch((error) => globals.info(error));
}
async function checkIn ( ) { return await globals . broker . post ( "/check-in" , { status : "arrived" , patient : "Patient/example" , location : "Location/example" , appointment : "Appointment/example" } ) . then ( ( response ) => { globals . config ( response ) ; console . log ( JSON . stringify ( response . data ) ) ; console . log ( "\n" ) ; const appointment = response . data . Appointment . id ; const encounter = response . data . Encounter . id ; return { appointment : appointment , encounter : encounter } ; } ) . catch ( ( error ) => globals . info ( error ) ) ; }
Send request to check-in endpoint.
Send request to check - in endpoint .