Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS »
Discussion: OpenMRS Talk »
Real-Time: IRC Chat

IRC Logs

Child pages
  • 2009-03-05 - OpenMRS
Skip to end of metadata
Go to start of metadata
01:31:06 *** [mharrison] has joined #openmrs
02:21:39 *** r0bby_ has joined #openmrs
02:21:39 *** ChanServ sets mode: +v r0bby_
02:21:44 *** r0bby has quit IRC
02:30:37 *** isurundt has joined #openmrs
03:01:52 *** jabobo has joined #openmrs
03:02:15 *** jacobb has quit IRC
03:07:03 *** nribeka has joined #openmrs
03:10:00 *** puchuu has quit IRC
03:14:47 *** [mharrison] has quit IRC
03:16:07 <isurundt> nribeka:if possible i need a help from you. still i cannot login to trac using my "isurundt" login. Ben have mentioned that he has given priviledges for my login to create and edit tickets. what may be the reason??
03:23:05 <nribeka> yes sir
03:23:30 <nribeka> isurundt, bwolfe told me that he doesn't know the reason
03:23:40 <nribeka> i asked him a few days back
03:24:13 <isurundt> yes. he also told me that.
03:24:45 <isurundt> ahh. sometimes i can login. sometimes cannot . :-(
03:25:03 <nribeka> so, you were able to login?
03:26:09 <isurundt> i tried another 2 times.. in the second time i was able to login. think its ok now.
03:32:08 *** bmckown has joined #openmrs
03:32:08 *** ChanServ sets mode: +o bmckown
03:45:43 *** nribeka1 has joined #openmrs
03:53:59 <isurundt> nribeka:ohh. again i cannot.. Trac is behaving very strangely..
04:00:58 *** nribeka has quit IRC
04:03:18 <nribeka1> isurundt, where to did you login?
04:03:22 <nribeka1> ticket page?
04:03:41 <isurundt> http://dev.openmrs.org/login
04:05:31 <nribeka1> hmm ... that
04:05:35 <nribeka1> 's strange
04:05:43 <nribeka1> i can login right away
04:06:02 <isurundt> hmm.. let me try again
04:08:44 <nribeka1> trac login and wiki page is different
04:08:53 <nribeka1> you are aware about it right?
04:09:55 <isurundt> yes
04:10:04 <nribeka1> i can login straight away
04:10:36 <nribeka1> i create another account for my friend too :P
04:11:12 <isurundt> can you please check whether my "isurundt" login is there
04:11:38 <isurundt> ben said that he gave priviledges for that to create and edit tickets
04:11:46 <nribeka1> hmm i don't have the privileges to do so isurundt unfortunately
04:11:54 <nribeka1> ben have it
04:12:03 <nribeka1> or bmckown :P well he's in kenya right now :)
04:12:21 <isurundt> :)
04:12:43 <nribeka1> where are you at right now isurundt?
04:12:56 <isurundt> im from Sri Lanka
04:13:12 <isurundt> now in the University
04:15:22 <nribeka1> ah ic ic
04:15:36 <nribeka1> did you try email bwolfe?
04:15:53 <isurundt> yes. got a reply from him too
04:19:35 <nribeka1> so you're unable to even create a ticket then?
04:22:27 <isurundt> yes
04:28:00 <nribeka1> interesting ...
04:28:12 <nribeka1> i will try to ask bwolfe again tomorrow
04:28:36 <nribeka1> have you join the dev list
04:28:37 <isurundt> ok.. thanx
04:28:42 <isurundt> yes.
04:28:46 <nribeka1> probably you can post your question there :)
04:28:54 <isurundt> ok. i will do that
04:29:10 <isurundt> thanks a lot
04:34:00 <nribeka1> ok ok
04:34:05 <nribeka1> cool :)
04:50:46 *** r0bby_ is now known as r0bby
05:02:31 *** bmckown has quit IRC
06:08:29 *** isurundt has quit IRC
06:46:04 *** [mharrison] has joined #openmrs
07:27:26 *** isurundt has joined #openmrs
08:25:00 *** isurundt has quit IRC
10:36:21 *** jabobo has quit IRC
10:36:30 *** jabobo has joined #openmrs
10:45:06 *** jabobo has quit IRC
10:48:02 *** jacobb has joined #openmrs
11:04:43 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1313 (defect closed): Run Servlet action open the browser to wrong address <http://dev.openmrs.org/ticket/1313> || OpenMRS Changesets: Changeset [7054]: eclipse tools: Run Servlet action opens browser to wrong address - #1313 <http://dev.openmrs.org/changeset/7054> || OpenMRS Tickets: Ticket #1313 (defect created): Run Servlet action open the browser to wrong address <http://dev.openmrs.org/ticket/1313>
11:19:13 *** nribeka has joined #openmrs
11:36:47 *** nribeka1 has quit IRC
12:13:42 *** james_regen has joined #openmrs
12:13:42 *** ChanServ sets mode: +v james_regen
13:02:03 *** Keelhaul has joined #openmrs
13:02:03 *** ChanServ sets mode: +v Keelhaul
13:16:18 *** bwolfe has joined #openmrs
13:16:18 *** ChanServ sets mode: +o bwolfe
13:44:51 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1309 (task closed): Broken numeric normal high range for concept dictionary <http://dev.openmrs.org/ticket/1309#comment:4> || OpenMRS Changesets: Changeset [7055]: 1.4.x: Backporting fix for hiNormal concept numeric values - #1309 and … <http://dev.openmrs.org/changeset/7055>
13:56:26 <nribeka> bwolfe, isurundt ask again about his login :P
13:56:52 <bwolfe> nribeka: thanks
13:56:55 <bwolfe> I emailed him
13:57:00 <bwolfe> yesterday
13:58:46 <nribeka> np :D
13:59:27 <Keelhaul> Fixed adding/removing of patient graphs from dashboard - #1259
13:59:27 <Keelhaul> Removed default weight/cd4 count concepts from dashboard
13:59:29 <Keelhaul> ah nice
13:59:31 <Keelhaul> about time
14:00:04 <Keelhaul> too bad it's all after the hibernate jar that breaks my module =/
14:02:15 <Keelhaul> nribeka: was anything in the code changed, or just the jar?`
14:03:12 <bwolfe> just the jar Keelhaul
14:03:23 <Keelhaul> ok, maybe i can just replace it for now
14:03:30 <bwolfe> you can check by clicking through to the changeset from the ticket
14:03:33 <bwolfe> !ticket 725
14:03:34 <OpenMRSBot> bwolfe: Ticket #725: http://dev.openmrs.org/ticket/725
14:03:48 <bwolfe> Keelhaul: yep, surprised you hadn't already :-)
14:04:05 <Keelhaul> bwolfe: i havent been doing anything productive since sunday =/
14:04:26 <bwolfe> ah, well thats why then. :-)
14:04:36 <Keelhaul> well besides reading that knock em dead book
14:05:46 <Keelhaul> bwolfe: that guy who's been working on the graphs, is he doing anything else?
14:05:50 <Keelhaul> in that area
14:12:29 <bwolfe> Keelhaul: which one is that ?
14:12:58 <Keelhaul> the drawgraphservlet
14:13:04 <Keelhaul> and the corresponding pages
14:13:13 <bwolfe> ticket ?
14:13:22 <Keelhaul> no ticket
14:13:32 <Keelhaul> just wondered whether someone is working to improve it
14:13:37 <Keelhaul> because i already have a better one
14:15:37 <bwolfe> Keelhaul: is there a reason you're not sharing? ;-)
14:15:54 <Keelhaul> yea, technically it's part of the module and therefore belongs to the dept
14:16:05 <Keelhaul> but it's just a lowly controller class
14:16:13 <bwolfe> I know someone was working on making that little table that goes along with the graphs look better, but nothing beyond that I think
14:16:17 <Keelhaul> that's only in that module because the trunk one didnt suffice
14:16:17 <bwolfe> Keelhaul: using jquery ?
14:16:27 <Keelhaul> no
14:16:47 <Keelhaul> just dynamic ranges of the graph (current one just draws one item per month) and range highlighting etc
14:26:32 <Keelhaul> bwolfe: i'm trying to figure out the easiest way to restrict data access based on location
14:26:44 <Keelhaul> i was thinking of creating a new set of privs
14:26:58 <Keelhaul> but i somehow have to override most controllers
14:27:23 <Keelhaul> i thought maybe i can override the data retrieval via AOP somewhere globally
14:27:28 <Keelhaul> and use the standard privs
14:27:38 <Keelhaul> and AOP would just prevent data access when needed
14:27:39 <Keelhaul> is that possible?
14:27:59 <bwolfe> Keelhaul: heh. pih has wanted this type of thing for a while
14:28:03 <bwolfe> and a few other people asked for it too
14:28:13 <bwolfe> AOP is your best bet
14:28:24 <bwolfe> but I fear it can get slow
14:28:25 <Keelhaul> i never used AOP before =/
14:30:20 <bwolfe> its pretty easy
14:30:32 <bwolfe> Keelhaul: there are links to some examples from the modules wiki page
14:30:35 <bwolfe> !modules
14:30:35 <OpenMRSBot> bwolfe: "modules" --- http://openmrs.org/wiki/Modules
14:37:04 <Keelhaul> bwolfe: can i have one advice class for everything?
14:37:15 <Keelhaul> seems like i can check the method name called
14:37:26 <bwolfe> Keelhaul: one advice class per service class
14:37:42 <bwolfe> but I suppose you could register one advice class to each service
14:38:34 <Keelhaul> hm
14:39:21 <Keelhaul> would it be faster to alter the query parameters before the service all, or to filter the output
14:39:33 <Keelhaul> prolly the former, but that might not always be possible
14:40:11 <Keelhaul> e.g. a getWhatever() method will only have one Location parameter
14:45:30 <bwolfe> Keelhaul: hmm
14:45:35 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1314 (task created): Change tinyint and bit columns to tinyint(1) <http://dev.openmrs.org/ticket/1314>
14:45:55 <bwolfe> Keelhaul: I hadn't thought of doing the change /before/ the method. I had always thought of it as restricting after
14:46:10 <bwolfe> Keelhaul: do all methods that you want to alter take in location parameters ?
14:46:14 <Keelhaul> problem is, a user will have n locations mapped o him
14:46:34 <Keelhaul> no, it's a bit more complicated
14:47:20 <Keelhaul> e.g. after a service call to getPatients(), the advice will look for each patient whether he has had any encounters at the given location before
14:47:31 <Keelhaul> if not, the patients gets dropped out of the result set
14:48:49 <Keelhaul> guess after is my only option
14:54:45 <bwolfe> Keelhaul: you could probably do it both ways
14:55:14 <bwolfe> I would suggest keeping a table linking patient_ids to location_ids using past encounters
14:55:27 <Keelhaul> bwolfe: the idea is to give providers access to patient data of patients who have had at least one encounter at the user's native department(s) before
14:55:38 <Keelhaul> table hmm
14:55:39 <bwolfe> right, that makes sense
14:56:08 <Keelhaul> a table could speed things up i guess
14:56:12 <bwolfe> hmm, if you are not doing it on strict location, then all methods will probably have to be after
14:56:50 <Keelhaul> but when and how would that table get updated
14:57:25 <Keelhaul> it should be filled when the module it started, then an additional advice should make a check/entry every time a new encounter is created
14:57:30 <Keelhaul> or edited
14:57:54 <Keelhaul> i'll try it w/o a table for now maybe and see how it performs
14:58:51 <Keelhaul> also
14:59:02 <Keelhaul> rather than creating duplicate privs for everything
14:59:12 <Keelhaul> maybe a user property is better
14:59:15 <Keelhaul> or smt
14:59:50 <bwolfe> Keelhaul: yeah, user property sounds right
15:00:23 <Keelhaul> bwolfe: i'm not sure how they are stored
15:00:51 <bwolfe> User.setUserProperty(String, String); :-)
15:00:55 <bwolfe> brb
15:01:25 <Keelhaul> thx
15:03:18 *** bwolfe_ has joined #openmrs
15:03:18 *** ChanServ sets mode: +o bwolfe_
15:16:57 *** atomicturtle has joined #openmrs
15:17:57 *** bwolfe has quit IRC
15:18:49 *** atomicturtle has left #openmrs
15:19:39 <r0bby> bwolfe_: =)
15:19:51 <r0bby> Spring break is coming up and well i don't party soooo
15:19:52 <r0bby> ;x
15:20:00 <r0bby> I'll be coding likely :X
15:20:34 <bwolfe_> r0bby: you should travel to Indy :-)
15:20:37 <bwolfe_> and code here :-)
15:20:52 <bwolfe_> we can hook you up with some office space
15:21:34 <Keelhaul> and free coffee?
15:21:48 <r0bby> how would I get there?
15:21:49 <r0bby> lol
15:22:00 <bwolfe_> plenty of free coffee
15:22:00 <r0bby> i do need to get this god damn thing done
15:22:07 <r0bby> Starbucks onlyu
15:22:11 <r0bby> im a coffee snob :)
15:22:13 <bwolfe_> r0bby: plane, train, or automobile
15:22:21 <r0bby> financing?
15:22:47 <r0bby> actually im going to atlantic city w/ fam but don't gamble during the day
15:22:53 <r0bby> so i use days
15:23:11 <bwolfe_> r0bby: financing is debatable.
15:23:27 <Keelhaul> gambling lol
15:23:27 <r0bby> hmmm
15:23:36 <r0bby> gotta go
15:23:41 <r0bby> school
15:23:41 <Keelhaul> i lost 30 euros once playing roulette
15:23:45 <Keelhaul> so i never bothered again
15:24:03 <bwolfe_> only 30? thats not bad
15:25:19 <Keelhaul> no, i was jsut there to try it out
15:25:31 <Keelhaul> but that was enough empiric evidence for me that luck is not on my side
15:25:37 <Keelhaul> so i never bothered to try again
15:30:48 *** jmiranda has joined #openmrs
15:30:48 *** ChanServ sets mode: +o jmiranda
15:41:15 *** nribeka1 has joined #openmrs
15:48:57 <Keelhaul> dammit
15:49:04 <Keelhaul> seems like i'll have to extend User
15:49:10 <jmiranda> Keelhaul, what's up?
15:49:18 <Keelhaul> i dont feel like ever extending any object again =/
15:49:21 <Keelhaul> jmiranda: not much
15:49:22 <jmiranda> :)
15:49:50 <Keelhaul> jmiranda: new hibernate jar wont allow to sucessfully extend objects, it seems
15:50:20 <jmiranda> what's the error/issue?
15:50:58 <bwolfe_> its all nribeka's fault ;-)
15:51:02 <Keelhaul> it says collection is not associated with any session
15:51:23 *** isurundt has joined #openmrs
15:51:24 <Keelhaul> in my case, i extended Encounter, and the patient dashboard threw that exception when loading the encounter list
15:51:57 <Keelhaul> it seems like the error is only there when doing the api call from a controller
15:52:06 <Keelhaul> at least a service test couldnt trigger it
15:53:21 <bwolfe_> hey isurundt
15:53:47 <jmiranda> hmmm
15:53:55 <jmiranda> it's the session issue?
15:54:08 <isurundt> ben: it is great you are there. still i cannot login to trac. sometimes i can.. but sometimes cannot
15:54:12 <jmiranda> nevermind, just seeing the earlier message
15:54:50 <bwolfe_> isurundt: sometimes you can ?
15:55:00 <isurundt> ben:now also i tried to login. but couldn't
15:55:01 <bwolfe_> isurundt: are you using the http or https urls ?
15:55:02 <isurundt> yep
15:55:06 <isurundt> http
15:55:14 <bwolfe_> very interesting
15:55:22 <isurundt> :)
15:55:56 <jmiranda> Keelhaul, did you try the old jar?
15:56:15 <bwolfe_> isurundt: what browser are you using ?
15:56:31 <isurundt> mozilla firefix.
15:56:41 <isurundt> *fireFox
15:56:57 <Keelhaul> jmiranda: yes
15:57:21 <Keelhaul> bwolfe_: now that i put the old jar back, i get the user/person error again lol
15:58:02 <bwolfe_> Keelhaul: haha, yeah, its one or the other until nribeka gets a fix in there :-)
15:58:31 <bwolfe_> isurundt: have you tried clearing your firefox cache ?
15:58:49 <isurundt> ben:yes
15:58:49 *** nribeka has quit IRC
16:01:10 <isurundt> ben:just now i was able to login... :)
16:02:00 <bwolfe_> heh
16:02:06 <bwolfe_> which user name works for you ?
16:02:16 <isurundt> isurundt
16:02:18 <isurundt> :)
16:03:40 <isurundt> ben:when i tried to click the create a ticket link and then once it redirect to the login page, login was successful
16:04:30 <bwolfe_> isurundt: hmm
16:04:37 <bwolfe_> so are you really not logged in ?
16:04:42 <bwolfe_> or did it just redirect you ?
16:06:47 <isurundt> ben: once i tried to click the create a ticket link, it said that i have no priviledges. and after that once i tried to log in login was sussessful
16:07:46 <isurundt> ben:is it ok if i create a ticket for the encounter type hierachy
16:07:57 <bwolfe_> isurundt: do you have cookies turned off ?
16:08:44 <bwolfe_> isurundt: yeah, it needs a ticket. it would be awesome if you could do it :-)
16:08:45 <isurundt> ben: no
16:08:59 <Keelhaul> bwolfe_: would you say "public class User extends org.openmrs.User" is a bad idea?
16:09:06 <Keelhaul> especially since User inherits itself
16:09:12 <isurundt> ben: ok. i will do that.
16:09:53 <bwolfe_> Keelhaul: is User in your module? Why not call it your own name ?
16:10:21 <isurundt> ben: also i did some coding as well. if possible can you please give me a feedback for that. :-)
16:11:01 <Keelhaul> bwolfe_: a new object type just for mapping?
16:11:34 <Keelhaul> public class UserMap { private User user; private List<Location> locations; } ?
16:11:45 <bwolfe_> isurundt: yep, add bwolfe to the cc list and I'll be notified. you can attach a patch to that ticket
16:13:05 <bwolfe_> Keelhaul: yeah, something like that
16:13:21 <bwolfe_> Keelhaul: you should not extend user :-p
16:13:26 <Keelhaul> prolly not
16:14:04 <isurundt> ben: ok great. i will do that
16:14:17 *** isurundt has quit IRC
16:23:48 <Keelhaul> bwolfe_: is it possible with hibernate to have a single object with a List<Location> to be built from multiple rows "user_id, location_id"
16:29:25 <jmiranda> Keelhaul, i think there would be two tables
16:29:38 <jmiranda> one for the user
16:29:47 <jmiranda> and then one for the user_location mapping
16:30:25 <Keelhaul> hm
16:31:11 <Keelhaul> jmiranda: so the first table would just contain a reference to the users table record?
16:33:21 <jmiranda> i think so
16:33:43 <jmiranda> which is kind of pointless
16:34:34 <jmiranda> give me a minute to think about it
16:35:13 <Keelhaul> well
16:35:21 <Keelhaul> a UserMap.hbm.xml
16:35:34 <Keelhaul> with many-to-one reference to User
16:35:45 <Keelhaul> and many-to-many ref to Location via an extra table
16:35:48 <Keelhaul> smt like that
16:37:05 <jmiranda> yeah
16:37:20 <jmiranda> so that would create the user_map table
16:37:26 <jmiranda> and a user_map_location table
16:37:56 <Keelhaul> yea =/
16:38:06 <Keelhaul> and then i'd need a service for that object too
16:40:13 <Keelhaul> that's a lot of hassle just so i can avoid extending User
16:40:26 <jmiranda> yeah, that's pretty easy though
16:40:38 *** bwolfe_ has quit IRC
16:40:55 *** bwolfe_ has joined #openmrs
16:40:55 *** ChanServ sets mode: +o bwolfe_
16:41:06 <jmiranda> it might not make sense to extend user in this case
16:41:24 <Keelhaul> well all i need is to add one new member to User
16:41:27 *** nribeka has joined #openmrs
16:41:38 <jmiranda> what is the use case that you're working on?
16:42:15 <Keelhaul> map 1-n Locations to a User
16:42:29 <Keelhaul> and restrict their access to patients who have had at least one encounter at one of these locations
16:42:50 *** r0bby|mibbit has joined #openmrs
16:42:55 *** r0bby|mibbit has quit IRC
16:43:12 <jmiranda> oh ok
16:43:33 <jmiranda> so it actually does make sense to extend user in this case
16:44:01 <r0bby> bwolfe_: pm
16:44:37 <Keelhaul> jmiranda: yea, but hibernate seems to give enough trouble with that class as is
16:44:45 <jmiranda> given that this is probably going to be a core "permissions" use case
16:45:01 <jmiranda> Keelhaul, yeah - i'm not saying we should ... just saying that it makes sense :)
16:45:09 <Keelhaul> =P
16:45:29 <r0bby> bwolfe_: see pm
16:46:07 <jmiranda> the other option is to extend Location
16:46:13 <jmiranda> add a many-to-many for users
16:46:28 <jmiranda> (not a good idea)
16:46:50 <Keelhaul> nope
16:47:15 <Keelhaul> heh
16:47:30 <Keelhaul> what if someone added a new member to User in trunk? =P
16:48:35 *** nribeka2 has joined #openmrs
16:49:50 <jmiranda> isn't that a problem either way?
16:49:59 <jmiranda> don't you need to assign locations to users
16:50:30 <jmiranda> in the latter case, the use case would be "assign user to location"
16:50:42 <jmiranda> in the former, it would be "assign location to user"
16:50:46 <Keelhaul> there would have to be a mapping table, yes
16:50:47 <jmiranda> or am i missing something?
16:50:57 <Keelhaul> but i wouldnt need to create a new object type
16:51:28 <jmiranda> oh, i see what you're saying
16:51:40 <jmiranda> you mean add the Locations attribute to User
16:51:45 <Keelhaul> yea
16:51:46 <jmiranda> propose it
16:51:53 <Keelhaul> List<Location>
16:51:56 <Keelhaul> or Set
16:52:17 <jmiranda> it probably makes more sense to have it in a permission related table
16:52:29 <jmiranda> or create a new LocationPrivilege link
16:52:35 <jmiranda> rather than a link to Location
16:52:54 <Keelhaul> well
16:53:05 <Keelhaul> what would that look like?
16:53:43 <jmiranda> extend Privilege maybe
16:53:55 <jmiranda> that way we just use what we already have
16:54:25 <jmiranda> LocationPrivilege would return a string which is the location name
16:54:59 <jmiranda> so you just have LocationPrivilege class and a mapping file
16:55:16 <jmiranda> the mapping file does subclasses Privilege
16:55:49 <jmiranda> you store the mapping in privilege_location (or vice versa)
16:56:25 <Keelhaul> so a new priv for each location?
16:56:51 <jmiranda> when you call User.getPrivileges() it returns a collection of privileges and location privileges
16:57:02 <Keelhaul> what if there are a ot of locations
16:57:18 <jmiranda> and you can test to see if the name of the encounter.location.name matches the location privilege
16:57:22 <jmiranda> hmm
16:57:25 <Keelhaul> the new Location hiearachy allows Location to be anything basically
16:57:33 *** nribeka1 has quit IRC
16:58:10 <jmiranda> say we've got 1000 users and 50 locations
16:58:18 <jmiranda> at worst, that's 50000 rows
16:58:37 <Keelhaul> i cant just allow encounters that have one of the locations mapped to the user
16:58:50 <Keelhaul> it must be all patient data if the patient ever had an encounter at one of the location
16:58:55 <Keelhaul> so a bit more comparing =/
16:59:02 <jmiranda> with location hierarchy, it makes it more manageable since you can point to the parent location and imply all of its children
17:00:02 <jmiranda> yeah
17:00:57 <jmiranda> if turns out the performance is terrible, we need to cache answers to the questions "where has this patient been seen"
17:01:20 <jmiranda> so we're not looking at all encounters every time
17:01:50 <jmiranda> but i assume a HQL/SQL query "select location from encounter where patient = ?" won't be terrible
17:01:59 <jmiranda> select distinct ...
17:02:34 <Keelhaul> hmm
17:02:38 <Keelhaul> good idea
17:02:50 <jmiranda> i feel more comfortable with an approach that uses the privilege entity
17:02:53 <jmiranda> rather than location or user
17:03:00 <jmiranda> since that's what we're modeling here ...
17:03:05 <jmiranda> ... a permission issue
17:03:08 *** nribeka has quit IRC
17:06:00 *** Keelhaul has quit IRC
17:06:05 *** Keelhaul has joined #openmrs
17:06:05 *** ChanServ sets mode: +v Keelhaul
17:13:27 *** nribeka2 has quit IRC
17:32:20 *** [mharrison] has quit IRC
17:33:31 *** Echidna_ has joined #openmrs
17:36:13 *** Echidna has quit IRC
17:49:58 *** isurundt has joined #openmrs
17:50:04 <OpenMRSBot> Recent updates in the world of openmrs: Justin Miranda: On Features and Feedback <http://blog.justinmiranda.com/2009/03/on-features-and-feedback.html>
18:01:36 <isurundt> ben: need a help from you to create a ticket for encounter type hierachy. this is my first time creating a ticket in trac. :-
18:02:43 <isurundt> ben: for the full description in addition to some introduction about the task, is it ok if i include how that can be implemented
18:11:57 *** pascal__ has joined #openmrs
18:13:40 *** nribeka has joined #openmrs
18:29:21 <bwolfe_> isurundt: yeah, that would be fine
18:29:38 <bwolfe_> isurundt: know that the ticket can be edited after you create it. so it doesn't have to be perfect the first time :-)
18:29:43 <bwolfe_> here there pascal__ . welcome!
18:29:44 <isurundt> ok..
18:34:38 <isurundt> ben: there is another question i need to ask.. Correct me if I am wrong. You have asked me to have a look at the roles page. In the Roles, particular role can have more than once parent role(as i understood). But in the Case of an Encounter types can there be more than one parent encounter type for a particular encounter type?
18:35:33 <isurundt> ben: i think no.. :-)
18:36:52 *** bwolfe_ is now known as bwolfe
18:37:29 <bwolfe> isurundt: you are correct. each encounter type will have only one parent
18:37:38 <bwolfe> isurundt: but there will be many children per encounter type
18:39:44 <pascal__> hi ben, i think you'll be hearing a lot from me in the near future :)
18:40:19 <pascal__> i'll be starting some dev work on openmrs next month
18:40:33 <bwolfe> pascal__: chris did mention that you might be coming on board. its nice to know its somewhat official now. :-)
18:40:43 <pascal__> yup, signed and sealed
18:40:47 <bwolfe> very nice
18:40:56 <bwolfe> are you still with your old employer at this point ?
18:41:24 <pascal__> yes, today was the first day of my 30 day notice period
18:41:45 <pascal__> i've just been reading the wiki and trying to get up to speed with the project
18:43:12 <bwolfe> pascal__: so 30 days is typical in SA? here its only 14... :-)
18:43:44 <bwolfe> pascal__: let us know about anything we can correct with the wiki documentation. its hard to enter the mindset of a new openmrs user to correct it.
18:43:55 <bwolfe> r0bby: pong
18:44:20 <pascal__> documentation looks good so far, i
18:44:42 <pascal__> 'll edit any mistakes i find... assuming i have the rights
18:45:59 <pascal__> also, i'm not sure if 30 days is the norm, but i work for an american company in any case.
18:46:07 <bwolfe> pascal__: yeah, the wiki is open to edits from any registered user
18:46:32 <pascal__> i'd much rather it be 14 in this case, but on the flip side, 30 days is useful if you're not the one terminating the contract
18:50:56 <pascal__> anyway, bibi all
18:51:03 *** pascal__ has quit IRC
18:52:03 <isurundt> ben: what are the valued i should put for priority, component, milestone
18:52:08 <isurundt> *values
18:52:28 <bwolfe> isurundt: the defaults are fine
18:54:00 *** nribeka1 has joined #openmrs
18:55:57 <isurundt> ben:ok
18:55:58 *** nribeka1 has quit IRC
18:59:18 *** nribeka1 has joined #openmrs
19:03:46 *** nribeka1 has quit IRC
19:05:55 <isurundt> ben: i added the ticket(1315:Encounter type Hierachy) . Can you please have a look at that and let me know whether I am correct.. :-
19:06:36 <bwolfe> !ticket 1315
19:06:36 <OpenMRSBot> bwolfe: Ticket #1315: http://dev.openmrs.org/ticket/1315
19:11:24 <bwolfe> isurundt: it looks right
19:11:36 *** nribeka has quit IRC
19:11:44 <bwolfe> there might be things that change or become more clear as you write the code, but that is ok, things change sometimes :-)
19:11:50 <isurundt> ben:thanks.. :-)
19:17:49 <Keelhaul> bwolfe: this is so tedious =/
19:17:54 <Keelhaul> so many methods to intercept
19:18:15 <Keelhaul> and if a method name changes, it might slip through
19:18:54 <bwolfe> Keelhaul: true
19:19:13 <Keelhaul> bwolfe: do i have to intercept getIdentifierType* methods?
19:19:20 <bwolfe> Keelhaul: at the end of your if statement you should have it throw an error or a warning if the method name isn't recognized (aka it slips through)
19:19:26 <bwolfe> Keelhaul: no
19:19:35 <bwolfe> Keelhaul: just anything that returns patients
19:19:52 <bwolfe> or returns obs
19:19:56 <bwolfe> or encounters
19:20:07 <Keelhaul> bwolfe: i also prevent execution of save/purge methods
19:20:14 <bwolfe> or program-workflows
19:20:15 <Keelhaul> in case the user somehow got the patient object
19:20:20 <Keelhaul> or Problems
19:20:30 <bwolfe> we don't have Problems...that yours :-)
19:20:34 <Keelhaul> =P
19:21:41 <OpenMRSBot> Recent updates in the world of openmrs: Justin Miranda: On Transparency and Staying On Task <http://blog.justinmiranda.com/2009/03/on-transparency-and-staying-on-task.html>
19:22:34 <Keelhaul> bwolfe: luckily all those 1000 deprecated methods just call the same method usually
19:32:26 <Keelhaul> bwolfe: if i manipulate the cohorts in PatientSetService, could it cause problems?
19:32:27 <isurundt> ben: i have added Parent Encounter Type in the EncounterType class and the changeset to the liquibase-update-to-latest.xml. How do i add a patch to the ticket?
19:34:05 <bwolfe> !patches
19:34:05 <OpenMRSBot> bwolfe: Error: "patches" is not a valid command.
19:34:08 <bwolfe> !patch
19:34:08 <OpenMRSBot> bwolfe: Error: "patch" is not a valid command.
19:34:24 <bwolfe> !learn patches as http://openmrs.org/wiki/Patches
19:34:24 <OpenMRSBot> bwolfe: The operation succeeded.
19:34:34 <bwolfe> !refer isurundt [patches]
19:34:34 * OpenMRSBot refers isurundt to "patches" --- http://openmrs.org/wiki/Patches
19:34:42 <bwolfe> Keelhaul: problems like what ?
19:34:51 <Keelhaul> like reporting no longer working properly
19:35:00 <Keelhaul> also, cohorts only hold patient ids
19:35:25 <Keelhaul> or object ids in general
19:35:54 <Keelhaul> checking every one of those could cause some serious lag heh
19:38:34 <bwolfe> Keelhaul: right
19:38:42 <bwolfe> thats actually where I worry about the lag coming in
19:39:20 <Keelhaul> i'm gonna either return empty cohorts for now or do nothing
19:40:33 <jmiranda> Keelhaul, don't worry about reporting not working properly
19:40:38 <jmiranda> i've already taken care of that
19:40:42 <Keelhaul> lol
19:41:04 *** Keelhaul has quit IRC
19:41:09 *** Keelhaul has joined #openmrs
19:41:09 *** ChanServ sets mode: +v Keelhaul
19:45:21 <Keelhaul> jmiranda: i actually could use reporting quite well after some hassle
19:45:29 <Keelhaul> it needs some better documentationo
19:46:07 <jmiranda> definitely
19:46:15 <jmiranda> or a more intuitive interface
19:46:31 <Keelhaul> heh
19:46:35 <Keelhaul> the interface has just been changed
19:46:38 <jmiranda> do you have any particular suggestions
19:46:46 <jmiranda> do you mean the new reporting framework tools
19:46:47 <Keelhaul> well
19:46:51 <Keelhaul> for the interface?
19:46:55 <Keelhaul> yea
19:47:04 <jmiranda> any of it
19:47:10 <Keelhaul> definition of macros and searches is a bit troublesome
19:47:36 <Keelhaul> it was nowhere said that macros are addressed via those characters you define in the macro definitions
19:47:44 <Keelhaul> i think i added that to the wiki after i found out
19:48:00 <Keelhaul> as for the searches themselves
19:48:07 <Keelhaul> i had a particular search case that i couldnt express
19:49:02 <jmiranda> what was that?
19:49:04 <Keelhaul> it was "number of patients who have had an obs with a certain concept on every encounter in a given time period"
19:49:30 <jmiranda> (btw, we definitely need to add more cohort queries, so just let us know what you want and we'll get it in there)
19:49:37 <Keelhaul> also, calculating percentages w/o excel would be great too
19:49:55 <jmiranda> could you explain that a little more
19:50:21 <Keelhaul> e.g. i have a number of patients who have had an encounter in the last 12 months
19:50:38 <Keelhaul> and a number of patients who have had certain values of an obs in the last 12 months
19:50:52 <Keelhaul> first number is the total
19:51:40 <Keelhaul> so basically, something like "percentage of patients who have had abnormal readings for concept XY in the last 12 months"
19:51:48 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1315 (task created): Encounter Type Hierachy <http://dev.openmrs.org/ticket/1315>
19:51:49 <jmiranda> ok, yeah that would be like what we're calling indicators (define numerator, denominator)
19:52:16 <Keelhaul> yes
19:52:24 <Keelhaul> hm
19:52:40 <jmiranda> would you like to be involved at all in the process of designing/developing any of this stuff?
19:52:50 <Keelhaul> not right now =/
19:52:58 <jmiranda> no problem
19:53:00 <jmiranda> just wanted to check
19:53:08 <jmiranda> i'll assume beta-user for now
19:53:15 <Keelhaul> i'm not really familiar with reporting, i just found out that stuff when trying to define some IDF recommendation reports
19:55:06 <Keelhaul> what's annoying is that you cant just import searches etc
19:55:10 <Keelhaul> because of concepts
19:55:12 <jmiranda> yeah
19:55:47 <jmiranda> that's a must-do for a lot of the reporting stuff
19:56:08 <jmiranda> being able to port searches, reports, indicators, etc over to another server is going to be key
19:56:37 <Keelhaul> some global concept mapping tool would be nice too
19:56:39 <jmiranda> but probably a feature implemented after we get a handle of the core reporting features
19:56:41 <Keelhaul> i think someone proposed something like that
19:56:55 <Keelhaul> i have 3 modules which each have to map concepts of their own
19:57:44 *** isurundt[1] has joined #openmrs
19:58:22 <jmiranda> where do you store the mappings right now?
19:58:28 <jmiranda> in global properties?
19:59:41 *** isurundt[1] has quit IRC
19:59:44 <jmiranda> or just hard-coded?
20:00:49 <Keelhaul> global
20:00:58 <Keelhaul> moduleid.concept.name
20:01:03 <Keelhaul> so they're kinda scattered
20:01:13 <Keelhaul> there are some defined in concept.weight etc
20:01:40 <Keelhaul> but i think it's discouraged to not use the moduleid when adding props
20:01:54 <jmiranda> yeah
20:02:04 <jmiranda> we just had a discussion about that
20:02:29 <jmiranda> we're thinking of making a global namespace for some properties
20:03:02 <jmiranda> however, i'm still not sure we want to have concept mapping in the global properties at all
20:03:23 *** nribeka has joined #openmrs
20:03:34 <jmiranda> eventually, we'll be able to use logic tokens
20:05:25 <jmiranda> so i guess global properties is ok for now
20:06:41 <Keelhaul> well
20:06:53 <Keelhaul> the global props could get very long if people map many concepts
20:07:22 <Keelhaul> i wrote a menu where you can map concepts using that concept search tool
20:07:28 <Keelhaul> unfortunately, it doesnt save properly
20:07:34 <Keelhaul> havent bothered fixing it
20:07:39 <Keelhaul> i just set the manually
20:08:18 <jmiranda> yeah, that and having the user be able to select from static data
20:08:25 <jmiranda> i.e. encounter type, order type
20:08:31 <jmiranda> for other global properties
20:08:49 <jmiranda> that should definitely be a "core" module framework feature
20:16:26 <bwolfe> jmiranda: we could use the concept mapping ability.
20:16:46 <bwolfe> jmiranda: we define a "core" concept source called "concepts used in code"
20:17:09 <bwolfe> jmiranda: then the user just has to map the string "WEIGHT" to that core concept source in the Edit Concept page for Weight
20:17:32 *** isurundt has quit IRC
20:17:47 <jmiranda> hmm
20:18:05 <Keelhaul> heh
20:18:07 <jmiranda> yeah, that's what i was thinking once we get to where logic service can be used everywhere
20:18:15 <bwolfe> jmiranda: ideally we have some easier way for users to edit the mappings than by them doing it manually one by one
20:18:19 <jmiranda> with the logic token as the backend
20:18:28 <jmiranda> but i like that as an interim solution
20:18:35 <jmiranda> yes, exactly
20:19:05 <Keelhaul> so you just enter "weight" into a new field on the concept edit page?
20:19:18 <jmiranda> although, i'm not seeing how to make that easier
20:19:33 <jmiranda> yeah, it's a unique string token that maps to a concept
20:19:39 <jmiranda> or a bunch of different concepts
20:20:09 <Keelhaul> a bunch?
20:20:12 <Keelhaul> how so
20:21:03 <Keelhaul> bwolfe: do i have to add an extra advice class for my encounterservice extension?
20:21:23 <jmiranda> in the case that you were dumb and defined different concepts for the same thing
20:21:25 <Keelhaul> or does the base class advice intercept those calls too
20:21:30 <jmiranda> but yeah, that doesn't work well in this case
20:21:50 <bwolfe> Keelhaul: not sure... I suggest you test it out
20:21:51 <jmiranda> you would still need to map to a single concept (i.e. when storing an obs)
20:21:54 <Keelhaul> jmiranda: maybe it should overwrite the mapping then, or tell the use what it is currently mapped to
20:22:47 <Keelhaul> user*
20:24:27 <jmiranda> yeah, we'd need a way to deal with conflicts
20:25:25 <jmiranda> which brings us back to namespaces
20:28:21 *** nribeka has quit IRC
20:29:00 *** nribeka has joined #openmrs
20:33:16 <Keelhaul> bwolfe: what are the criteria to make privileges locked (i.e. undeletable)?
20:33:29 <Keelhaul> no role uses them
20:33:33 <Keelhaul> and the module that added them isnt loaded
20:33:37 <Keelhaul> yet they are still locked
20:47:47 * r0bby sighs
20:49:07 * nribeka sighs
20:53:59 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1316 (task created): Cohort Builder does not handle questions whose datatype is Boolean <http://dev.openmrs.org/ticket/1316> || OpenMRS Changesets: Changeset [7056]: data_synchronization_bidirectional: Fixed issue with sync-ing new forms. … <http://dev.openmrs.org/changeset/7056>
20:54:10 <bwolfe> Keelhaul: they are locked if they are returned by OpenmrsConstants.CORE_PRIVILEGES
20:54:22 <Keelhaul> hmm
20:54:27 <Keelhaul> how did they become core privs =o
20:55:18 <bwolfe> Keelhaul: were they added by a module ?
20:55:21 <Keelhaul> yes
20:57:10 <Keelhaul> dammit
20:57:10 <Keelhaul> "SELECT * FROM location WHERE location_id IN (SELECT DISTINCT location_id FROM encounter WHERE patient_id="
20:57:10 <Keelhaul> + who.getPatientId() + ");
20:57:12 *** james_regen has quit IRC
20:57:14 <Keelhaul> whats wrong with this query
20:59:11 <bwolfe> whats the error message ?
20:59:34 <Keelhaul> org.hibernate.exception.SQLGrammarException
20:59:34 <Keelhaul> could not execute query
21:00:10 <bwolfe> heh
21:00:18 <bwolfe> there should be a sql exception farther down
21:00:48 <Keelhaul> http://rafb.net/p/EAIqg175.html
21:01:00 <Keelhaul> that's not the same query as i pasted earlier, but it looks jsut the same
21:01:30 <bwolfe> look in your tomcat logs
21:01:41 <bwolfe> it should have a "caused by" stack trace also
21:05:36 *** jmiranda has quit IRC
21:07:20 <Keelhaul> ERROR - JDBCExceptionReporter.logExceptions(78) |2009-03-05 21:56:03,916| You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM inpatientcare_room WHERE room_id IN (SELECT DISTINCT room_id FROM ' at line 1
21:07:27 <Keelhaul> bwolfe: that's all that's there
21:07:41 *** Keelhaul has quit IRC
21:07:47 *** Keelhaul has joined #openmrs
21:07:47 *** ChanServ sets mode: +v Keelhaul
21:08:34 <bwolfe> Keelhaul: it looks right to me...
21:09:14 <Keelhaul> bwolfe: http://rafb.net/p/grQ8SA10.html
21:09:19 <Keelhaul> perhaps something in the method itself?
21:09:59 <bwolfe> its invalid critiera
21:10:35 <Keelhaul> how is it invalid?
21:10:37 <bwolfe> Keelhaul: turn on hibernate's printing of the sql statements
21:10:44 *** nribeka1 has joined #openmrs
21:10:50 <bwolfe> I don't think Expression.sql is used like that
21:12:38 <bwolfe> Keelhaul: my guess is that its just the WHERE room_id IN (SELECT DISTINCT room_id FROM encounter WHERE patient_id="
21:12:38 <bwolfe> + who.getPatientId() + "); part
21:12:47 <Keelhaul> hm
21:12:47 <bwolfe> or maybe not "WHERE"
21:13:01 <bwolfe> have hibernate print the sql statemetns its generating
21:13:08 <bwolfe> its a runtime property you can turn on
21:14:57 <Keelhaul> bwolfe:
21:14:58 <Keelhaul> http://rafb.net/p/aQR41R95.html
21:15:17 <Keelhaul> javax.servlet.ServletException
21:15:17 <Keelhaul> There is no patient with id: '121'
21:15:19 <Keelhaul> that's more like it
21:17:21 *** nribeka has quit IRC
21:24:07 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1282 (defect closed): New forms failed with sync 1.0.2 <http://dev.openmrs.org/ticket/1282#comment:2> || OpenMRS Changesets: Changeset [7057]: data_synchronization_bidirectional: fixed bug with FF3 on linux, changed " … <http://dev.openmrs.org/changeset/7057>
21:25:08 <Keelhaul> that being fixed (i hope), it's dinner time
21:25:09 <Keelhaul> bbl
22:28:09 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [7060]: eclipse tools: update version numbers for the 0.3.1 release - #1317 <http://dev.openmrs.org/changeset/7060> || OpenMRS Changesets: Changeset [7059]: eclipse tools: update version numbers for the 0.3.1 release - #1317 <http://dev.openmrs.org/changeset/7059> || OpenMRS Tickets: Ticket #1317 (task created): Prepare the DevStudio 0.3.1 release <http://dev.openmrs.org/ticket/1317> || OpenMRS Tickets: Ticket #1311 (defect closed): OpenMRS Development Studio: Resource Already Exists <http://dev.openmrs.org/ticket/1311> || OpenMRS Changesets: Changeset [7058]: eclipse tools: Module Builder does not clean the build directory correctly … <http://dev.openmrs.org/changeset/7058>
22:54:49 *** nribeka has joined #openmrs
23:08:31 <Keelhaul> bwolfe: the user form lists existing user properties, but how can i add new ones?
23:09:50 <bwolfe> via code
23:09:58 <bwolfe> I didn't really want end users adding new ones
23:10:12 <bwolfe> although maybe we allow it
23:10:36 <bwolfe> just don't allow editing of old property_names
23:11:41 <Keelhaul> bwolfe: there're no extension points on user.form either
23:12:54 *** nribeka1 has quit IRC
23:13:16 <bwolfe> it should probably have one
23:14:00 <Keelhaul> i need to add something like a checkbox on that page
23:14:11 <Keelhaul> "Location-restricted [x]"
23:14:23 <Keelhaul> that translates to a user prop
23:14:48 <bwolfe> Keelhaul: you can use a person attribute
23:15:56 <bwolfe> bbl
23:25:04 *** bwolfe has quit IRC
23:32:16 <OpenMRSBot> Recent updates in the world of openmrs: News Blog: OpenMRS 1.4 RC Released <http://blog.openmrs.org/?p=106>
  • No labels