HomePage RecentChanges MedicalAPI

Medical API

#!Perl
get '/' => sub {
  my $base = uri_for('/person/'). "";
  my $sth = database->prepare(qq{
    SELECT
      person.id as id, concat('$base', person.id) as href, 
      person.display_name as display_name
    FROM
      person
    ORDER BY
      display_name
  });
  $sth->execute();
  return {
    person => $sth->fetchall_arrayref({}),
  };
};
#!JavaScript
var api = new $.RestClient('/api', { stripTrailingSlash: true});

api.add('patient');
api.patient.add('medication');
api.patient.add('data');

api.patient.read()
.done(function(data) {
  console.log(data);
});

api.patient.medication.create('ABC123', { value: 'Ibuprofen' })
.done(function(data) {;
  console.log(data);
});

Software error:

Can't locate object method "endform" via package "CGI" at /data/scott.dd.com.au/wiki/modules/search.pl line 15.

For help, please send mail to the webmaster (webmaster@dd.com.au), giving this error message and the time and date of the error.