I am using that one in SysAdmin OWA. Can you take a look at here for setOpenMRSLocation function,
setOpenMRSLocation