0

Running the Cerner SMART on FHIR tutorial out of the box I get an unknown method Javascript error for the following lines.

        fname = patient.name[0].given.join(' ');
        lname = patient.name[0].family.join(' ');

I've currently resolved by changing to the following

        fname = patient.name[0].given;
        lname = patient.name[0].family;

What is the correct fix for this? I'm assuming the above is not a perfect work around.

Cerner tutorial is here: https://engineering.cerner.com/smart-on-fhir-tutorial/

SMART App Launcher is here: https://launch.smarthealthit.org/

John
  • 3,458
  • 4
  • 33
  • 54

1 Answers1

0

Patient.name is datatype HumanName. The family property (i.e lastname) is not an array, so calling join on it is incorrect.

Jason S.
  • 485
  • 2
  • 10