Hi,
I'm working with a SMART Problems app, trying to create a way to populate problems via questionnaire. I'm in early experimental phase and I created a problems view using SMART js client, but in order to see any problems,I must first put some problems in. So I tried to create a SMART api call that would insert a problem:
SMART.api_call({
method: 'POST',
url: "/records/" + SMART.record.id + "/problems/",
data: {
startDate: '![CDATA[2007-10-01]]',
endDate: '![CDATA[2010-09-13]]',
name_title: '![CDATA[Hypothyroidism]]',
name_system: 'http://purl.bioontology.org/ontology/SNOMEDCT/',
name_identifier: '![CDATA[40930008]]' }
},
function(response) { alert('data received: ' + response.body); });
As far as I can tell this should be enough data to create a problem, but I may be missing something. Executing this script ends with 'uncaught exception: error called for nonexistent message: 374997'
Please advise