Hi.
I'm working on registration of single events through SMS, but I struck a
problem and hope somebody can help me.
In 2.12 you can create a SMS command connected to a dataset, then edit the
command and create codes that is tied to the data elements. Single event is not
connected to data sets, but to programs. I can now create a commands that is
connected to a program instead of a dataset, but when I go to edit the data
elements in the program does not show, so I can't create any codes in the
command.
I guess it has something to do with that /dhis-api/dataelement is connected to
datasets, but not to programs.
Programs has kind of their own datalement-methods in /dhis-api/program.
Any idea or tips on how I can import the programs data elements in
edit-sms-command.vm would be much appreciated!
- Snorre Olimstad
PS: This is the current code that import the data elements into
edit-sms-command.vm:
#foreach( $dataElement in $dataElements)
#if ($dataElement.categoryCombo &&
$dataElement.categoryCombo.sortedOptionCombos)
#foreach($x in $dataElement.categoryCombo.sortedOptionCombos)
#set ($str = ""+$dataElement.id+""+$x.id)
<tr>
<td>
$dataElement.name $x.name
</td>
<td>
<input type="text" name="$dataElement.id.$x.id"
value='$!codes[$str]' class="validate">
</td>
</tr>
#end
#else
<tr>
<td>$dataElement.name</td>
<td><input type="text" name="$dataElement.id"></td>
</tr>
#end
#end_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp