IRC Chat : 2012-04-14 - OpenMRS

00:04:38 <MarkG> djazayeri: nah, don't worry about it...i debated even telling you about the lack of a decent error message... it wasn't "you should have put a better message in" but rather a "if you think you put a better message in, it didn't work, fyi..." :)
00:05:00 <djazayeri> MarkG: I was aware, but was planning to ignore it
00:06:43 *** lh has quit IRC
00:07:56 <nadee> djazayeri: hi daruis, i have the patch with void-->delete, purge-->delete forever, leaving out the already available 'delete' occurances leftout ftm, shall I submit it or what would be the next plan please?
00:08:18 <djazayeri> nadee: go ahead and attach it to the ticket, and click Request Code Review.
00:08:36 <nadee> cool, thanks!
00:08:52 <djazayeri> nadee: Also, add a comment to the ticket saying what the already available delete occurrances were.
00:09:44 <nadee> sure
00:15:39 *** bwolfe has quit IRC
00:16:16 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: Metadata Sharing 1.0.5.1 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=metadatasharing&ampversion=&amp1.0.5.1>
00:21:35 *** wyclif has joined #openmrs
00:38:27 *** anu_GSOC has joined #openmrs
00:38:32 *** mseaton has joined #openmrs
00:38:32 *** ChanServ sets mode: +v mseaton
00:38:48 *** anu_GSOC has left #openmrs
01:36:42 *** MarkG has quit IRC
01:55:49 *** morristic has joined #openmrs
02:01:18 *** morristic_ has joined #openmrs
02:02:11 *** djazayeri1 has joined #openmrs
02:04:28 *** morristic has quit IRC
02:04:28 *** morristic_ is now known as morristic
02:04:38 *** djazayeri has quit IRC
02:05:38 *** MarkG has joined #openmrs
02:14:13 *** morristic has quit IRC
02:15:33 *** MarkG has quit IRC
02:32:39 *** Anuruddha_ has joined #openmrs
02:38:20 *** Anuruddha_ has quit IRC
02:38:29 *** anu_GSOC has joined #openmrs
02:41:00 *** mccallumg has quit IRC
02:44:45 *** maurya has joined #openmrs
02:48:13 *** maurya has quit IRC
02:53:21 *** nadee has quit IRC
02:57:08 *** anu_GSOC has quit IRC
03:01:55 *** gauravpaliwal has joined #openmrs
03:01:55 *** ChanServ sets mode: +v gauravpaliwal
03:08:27 *** mccallumg has joined #openmrs
03:08:27 *** ChanServ sets mode: +v mccallumg
03:10:08 *** mccallumg has quit IRC
03:10:20 *** harshadura has quit IRC
03:20:55 *** mseaton has left #openmrs
03:55:44 *** gauravpaliwal has left #openmrs
04:52:32 *** mathiaslin has joined #openmrs
06:03:10 *** Rahul has joined #openmrs
06:12:27 *** suranga has joined #openmrs
06:12:27 *** ChanServ sets mode: +v suranga
06:13:46 *** Rahul has quit IRC
06:18:46 *** mathiaslin has quit IRC
06:19:42 *** deadpool has joined #openmrs
06:19:53 <deadpool> djazayeri1: can i bother you again?
06:19:57 <deadpool> it is for html forms
06:21:11 <deadpool> or if anyone can help that would be awesome
06:21:25 <deadpool> i am using javascipt to dynamically add some concepts to the forms
06:21:40 <deadpool> and it works and all but when i press enter form it only saves the first entry and not the other ones
06:21:49 <deadpool> can anyone tell me what i am doing wrong?
06:23:58 *** mathiaslin has joined #openmrs
06:27:23 *** Rahul has joined #openmrs
06:27:46 *** suranga has quit IRC
06:35:21 *** nadee has joined #openmrs
06:36:06 *** deepa has joined #openmrs
06:36:29 *** djazayeri1 is now known as djazayeri
06:36:29 *** ChanServ sets mode: +o djazayeri
06:36:55 <deepa> Hi Rahul
06:38:04 <djazayeri> deadpool: in HTML Form Entry, when the form definition is processed on the server side, it creates Elements and Widgets. Those things know how to handle their own submission, and they also know what form field names they rendered as when the form was generated
06:38:47 <djazayeri> so merely adding fields via javascript won't do anything, unless there's an Element or Widget on the form that knows to handle those
06:40:28 <djazayeri> deadpool: email if you have further questions, i'm off to bed
06:43:19 *** deadpool has quit IRC
06:45:26 *** deadpool has joined #openmrs
06:48:21 *** deepa has quit IRC
06:55:43 *** deepa has joined #openmrs
07:00:01 *** Rahul has quit IRC
07:05:01 *** deepa has quit IRC
07:07:23 *** deadpool has quit IRC
07:08:06 *** deadpool has joined #openmrs
07:43:25 *** deadpool has quit IRC
07:44:00 *** deadpool has joined #openmrs
07:52:54 *** anu_GSOC has joined #openmrs
07:56:20 *** mathiaslin has quit IRC
08:09:08 *** Rahul has joined #openmrs
08:16:27 *** inane has joined #openmrs
08:16:34 <inane> 'ello.
08:21:36 *** bryq has joined #openmrs
08:21:36 *** ChanServ sets mode: +v bryq
08:32:51 <inane> What must one do to make the 'Gender' field visible on the Patient Dashboard?
08:40:30 *** deadpool has quit IRC
08:41:13 *** deadpool has joined #openmrs
08:46:43 *** deadpool_ has joined #openmrs
08:50:09 *** deadpool has quit IRC
08:55:08 *** anu_GSOC has quit IRC
09:20:21 <inane> bbl.
09:20:26 *** inane has left #openmrs
09:57:12 *** deadpool_ has quit IRC
09:57:46 *** deadpool_ has joined #openmrs
10:06:32 *** deadpool_ has quit IRC
10:54:02 *** chopin_ has joined #openmrs
10:59:39 *** snoppy has joined #openmrs
11:12:05 *** chopin has joined #openmrs
11:13:13 *** Rahul has quit IRC
11:18:19 *** chopin_ has quit IRC
11:18:55 *** snoppy has quit IRC
11:19:09 *** chopin has quit IRC
11:44:42 *** snoppy has joined #openmrs
12:04:41 *** MarkG has joined #openmrs
12:13:03 *** chopin has joined #openmrs
12:13:04 *** chopin_ has joined #openmrs
12:52:23 *** chopin_ has quit IRC
12:53:57 *** pulasthi7 has joined #openmrs
12:54:44 *** chopin has quit IRC
12:59:00 *** pulasthi7 has quit IRC
13:01:38 *** snoppy has quit IRC
13:03:10 *** harshadura has joined #openmrs
13:22:18 *** harshadura has quit IRC
13:35:59 *** harshadura has joined #openmrs
13:58:03 *** harshadura has quit IRC
14:41:41 *** finbrein has quit IRC
14:55:32 *** nadee has joined #openmrs
14:59:42 <nadee> djazayeri: hi darius,
14:59:53 <nadee> djazayeri: I guess I have sorted out trunk-2296, please take a look at it and let me know if my approach is correct
15:00:35 <djazayeri> nadee: I don't see a patch on the ticket (yet?)
15:00:48 <nadee> just did :)
15:00:51 <nadee> *just
15:01:02 *** Jibesh has joined #openmrs
15:01:40 <djazayeri> I see it now
15:01:56 <nadee> djazayei: and added a comment as well with my queries
15:02:08 <djazayeri> I'll review, give me a second
15:02:44 <nadee> sure, thanks!
15:10:29 <djazayeri> nadee: this looks right. (The .patch file was a bit tough to read, and I didn't apply the patch to view the diff in the IDE yet, but it's the right approach)
15:10:52 <djazayeri> Is the only reference to validatePersonName the one in ShortPatientForm?
15:11:21 <nadee> in the trunk, all I found was that
15:11:46 <nadee> great! let me know later then :)
15:11:54 <djazayeri> nadee: a couple comments
15:12:01 <nadee> sure
15:12:54 <djazayeri> You kept the validatePersonName method, but you changed its arguments
15:13:07 <nadee> yeah
15:13:19 <djazayeri> if you're going to preserver that method, for potential compatibility with module code that calls it, you need to leave it with the same arguments.
15:14:16 <djazayeri> But you might as well merge the actual functionality into validate, and have the validatePersonName call that (and mark validatePersonName as deprecated)
15:14:48 <nadee> I did so because the only reference to it was the getfieldkey method, which as I found is no longer needed
15:14:54 <nadee> yeah..
15:15:16 <djazayeri> nadee: I notice that you also changed the way that the person address validator is called
15:15:25 <djazayeri> does that class also need to be fixed like PersonNameValidator?
15:16:31 <nadee> it had a field named index, which I changed to addressArrayIndex, as a similar field is introduced named namesArrayIndex
15:17:15 <nadee> thought the name will add more sense with similar language
15:17:16 <djazayeri> oh, I see, the personAddress code was already using nestedPath
15:17:23 <nadee> yeah
15:18:15 <djazayeri> okay
15:18:51 <djazayeri> so, you want to leave the original method with the same signature, but deprecate it, and move the logic into validate
15:18:55 <djazayeri> (thus simplifying the code)
15:19:11 <djazayeri> and fix the tests so they test the new, correct, behavior
15:19:14 <djazayeri> makes sense?
15:20:39 <nadee> what about the shortpatientFormValidator? As I have said on the comment...
15:20:39 <djazayeri> nadee: ^^
15:21:14 <nadee> ShortPatientFormValidator.java line 104 which needs directly the personName created at line 84
15:22:24 <djazayeri> hold on, I don't have the trunk code open, let me look up those lines
15:22:36 <nadee> sure
15:24:27 <djazayeri> ShortPatientFormValidator should be changed to just call PersonNameValidator.validate
15:24:49 <djazayeri> with the regular (name, errors)
15:26:05 <djazayeri> the actual goal is to get rid of the validatePersonName method (or at least deprecate it), and change things that called it to call validate instead, in the normal way
15:26:12 <djazayeri> yes
15:26:33 <nadee> okey, got it
15:26:57 <nadee> thanks darius!
15:27:05 <djazayeri> np
15:31:40 *** dmexs has joined #openmrs
15:32:05 <dmexs> anybody here?
15:33:59 *** nadee has quit IRC
15:38:02 *** sgithens has joined #openmrs
15:40:49 <djazayeri> dmexs: 5% here
15:43:10 <dmexs> can I borrow your 5% for a moment? getting a txtConcept is not defined error when trying to set a box's external source value on xforms
15:43:30 <djazayeri> dmexs: I don't really know anything about xforms, so my 5% isn't going to help
15:43:40 <dmexs> shoot, alright
15:43:53 <dmexs> tgat's dkayiwas expertise?
15:44:36 *** bryq has quit IRC
15:44:45 <djazayeri> dmexs: him and others
15:45:17 <djazayeri> dkayiwa wrote the module though
15:45:27 <dmexs> alright
15:45:33 <dmexs> anybody who might be of help here?
15:45:45 <djazayeri> try emailing the implementers list
15:46:23 *** kavuri has joined #openmrs
15:47:08 <dmexs> ok
15:47:48 <dmexs> here? https://listserv.iupui.edu/cgi-bin/wa-iupui.exe?SUBED1=OPENMRS-IMPLEMENT-L&A=1
15:47:53 <OpenMRSBot> <http://ln-s.net/$0kv> (at listserv.iupui.edu)
15:49:11 <djazayeri> dmexs: assuming that's the link from here, yes: https://wiki.openmrs.org/x/SQAr
15:52:07 *** sgithens has quit IRC
15:52:58 <dmexs> kk thanks
16:00:06 *** dmexs has quit IRC
16:09:47 *** rohitgoyal18 has joined #openmrs
16:09:49 *** MarkG has quit IRC
16:10:21 *** MarkG has joined #openmrs
16:42:37 *** sgithens has joined #openmrs
16:51:08 *** kavuri has quit IRC
17:00:49 *** dkayiwa has joined #openmrs
17:04:25 *** inane has joined #openmrs
17:04:33 * inane waves cautiously
17:25:15 *** bwolfe has joined #openmrs
17:25:15 *** ChanServ sets mode: +o bwolfe
17:29:55 *** dmexs has joined #openmrs
17:33:28 *** kavuri has joined #openmrs
17:35:15 <dmexs> dkayiwa: how you doing sir! :)
17:35:33 <dkayiwa> dmexs: am doing fine. and you? :)
17:36:06 <dmexs> not too bad not too bad
17:36:13 <dmexs> studying, same old
17:36:40 <dkayiwa> dmexs: oh thats 8)
17:36:51 <dkayiwa> dmexs: been long since i last saw you here :)
17:37:09 <dmexs> I thought I had a problem earlier but upgrading to the latest xforms module solved it. how's things been with openers?
17:37:34 <dmexs> I know the project I used OpenMRS for happens every year in the summer
17:37:42 <dmexs> So this year I'm trying to pass it off to another student
17:38:15 <dmexs> maybe this year I can get to contributing to the Wiki and/or code
17:38:45 <dkayiwa> dmexs: oh that will be so so cool
17:39:05 <dkayiwa> dmexs: i already got so excited by the wiki documentation you did
17:39:14 <dkayiwa> dmexs: it was so so cool!!! :D
17:39:23 <dmexs> which?
17:39:45 <dkayiwa> dmexs: oh sorry i had mixed you with mnunanez :)
17:40:04 <dmexs> haha, I was about to say
17:40:09 <inane> so I may bother you guys with a repeat of me question?
17:40:45 <dmexs> any big advancements though dkayiwa ?
17:41:00 <dkayiwa> dmexs: bug fixing mainly :)
17:41:17 <dkayiwa> inane: here you just ask and anyone can answer you :)
17:41:40 <dmexs> dkayiwa: always a good thing haha
17:42:53 <dkayiwa> dmexs: oh yes. and more good when you test and confirm bug fixed :)
17:43:51 <dmexs> haha, I'm good at that
17:44:51 <dkayiwa> dmexs: i trust you. :)
17:45:46 <inane> hmz. It's a user question rather than a developer one... How do I get a demographic attribute to appear on the dashboard?
17:46:56 <bwolfe> inane, set the "view" property on the Manage Person Attribute Types page
18:08:21 *** MarkG has quit IRC
18:08:30 *** Jibesh has left #openmrs
18:10:48 *** finbrein has joined #openmrs
18:20:24 <djazayeri> inane: are you talking about something that's in the person_attribute (and person_attribute_type) tables, or something on the person table like gender?
18:22:35 <inane> back. had to take Sir D downstairs. I'm talking exactly about gender
18:27:32 <bwolfe> where do you want to see it on the dashboard?
18:27:38 <bwolfe> gender is already there, isn't it? :-)
18:28:01 <djazayeri> bwolfe: it's there as an icon. I assume inane wants to see it as text?
18:34:55 <inane> not on the dashboard
18:35:12 <inane> i'm looking to see it up there next to the name and identiffier
18:36:27 <inane> is it there as an icon?? hang on
18:42:05 <kavuri> bwolfe, downey: is there a concept of hospitals or is it so that one openmrs instance is designed to be for 1 clinic/hospital?
19:13:16 <inane> past midnight. 'night all. i'll check in later
19:13:20 *** inane has quit IRC
19:28:18 *** dmexs has quit IRC
19:30:42 *** kavuri has quit IRC
19:59:04 *** MarkG has joined #openmrs
20:26:51 *** MarkG has quit IRC
20:46:21 *** dmexs has joined #openmrs
20:56:07 *** rohitgoyal18 has quit IRC
21:11:33 *** bryq has joined #openmrs
21:11:33 *** ChanServ sets mode: +v bryq
21:37:36 <finbrein> djazayeri: I'd like to participate in the sprint! ;)
21:37:48 <djazayeri> finbrein: excellent!
21:38:23 <djazayeri> finbrein: I know you've done a bunch of tickets over the last month or so, so you're familiar with OpenMRS. How familiar are you with REST Web Services, and the theory?
21:38:59 <finbrein> djazayeri: I'd like to do (1) coding task and (1) documentation task
21:39:01 *** bryq has quit IRC
21:40:02 <finbrein> djazayeri: I have taken a course in Web services and I had the maximum grade in the course. It was not REST based but SOAP,
21:40:25 <djazayeri> finbrein: okay, the the idea is a bit different, but obviously related.
21:41:36 <finbrein> djazayeri: SOAP Web Services with Axis2; Services with XML-RPC; Axiom Web Services
21:42:28 <djazayeri> the idea behind REST is to think of things as everything as a "resource" that you can perform up to 4 verbs on (GET, POST, DELETE, PUT)
21:42:44 <djazayeri> http://en.wikipedia.org/wiki/Representational_state_transfer is probably a good intro. :-)
21:42:49 <OpenMRSBot> <http://ln-s.net/$0s$> (at en.wikipedia.org)
21:43:44 <djazayeri> anyway, do you want to take a look at the sprint dashboard and pick a ticket?
21:44:18 <finbrein> I am taking a look now
22:03:34 <finbrein> djazayeri: I have claimed tickets, so I'll go ahead with the task
22:03:42 <djazayeri> cool, which one?
22:04:59 *** dkayiwa has quit IRC
22:07:47 <finbrein> djazayeri: RESTWS-214, RESTWS-216
22:07:58 <djazayeri> !ticket restws-214
22:07:59 <OpenMRSBot> djazayeri: [#RESTWS-214] Self link has wrong URL for module resources - OpenMRS JIRA - https://tickets.openmrs.org/browse/restws-214
22:08:03 <djazayeri> !ticket restws-216
22:08:04 <OpenMRSBot> djazayeri: [#RESTWS-216] Add page describing POST content - OpenMRS JIRA - https://tickets.openmrs.org/browse/restws-216
22:08:21 <djazayeri> finbrein: by the way, you should only claim one ticket at a time
22:08:50 <djazayeri> i.e. you shouldn't claim a ticket that you intend to work on in the future, but rather just what you're working on immediately.
22:09:02 <finbrein> I'll claim 216 for now
22:09:14 <finbrein> ah, ok
22:09:17 <djazayeri> so others have something to work on. :-)
22:09:37 <finbrein> i understand now
22:09:50 <djazayeri> cool
22:14:34 <finbrein> djazayeri: can i add the page for RESTWS-216 under https://wiki.openmrs.org/display/docs/Webservices.rest+Module
22:14:35 <OpenMRSBot> <http://ln-s.net/92SZ> (at wiki.openmrs.org)
22:17:22 <djazayeri> finbrein: actually it would be best if this goes on the existing resource pages
22:17:52 <djazayeri> finbrein: this page: https://wiki.openmrs.org/display/docs/REST+Web+Service+Resources
22:17:53 <OpenMRSBot> <http://ln-s.net/8z-a> (at wiki.openmrs.org)
22:18:07 <djazayeri> the content here is actually auto-generated based on the @WSDoc annotation
22:19:04 <djazayeri> finbrein: I'm not 100% certain how we auto-generate it. I should figure that out
22:19:21 <djazayeri> bwolfe: you there? do you know what task generates the restws resource documentation?
22:20:45 <finbrein> djazayeri: You mean the list on that page is auto-generated
22:21:00 <djazayeri> finbrein: it's autogenerated by our code (somehow) and then it's manually pasted into the wiki
22:21:29 <djazayeri> i.e. you shouldn't manually modify the wiki page, but you should annotate and document the code so the proper documentation is generated.
22:24:34 <djazayeri> finbrein: I guess the ResourceDocCreator class is what generates the documenation, but (I'm embarassed to admit) I don't know where we invoke this from
22:25:48 <djazayeri> finbrein: so, I see that the fillInOperations is not currently being called in that class, so I guess some code still needs to be written to make that work
22:26:28 <djazayeri> so, what I suggest you do, is take a look at some of the key resources (patient, encounter) and figure out what the json post content should be for them, and document that in ticket comments
22:27:16 <finbrein> djazayeri: ok, thanks
22:28:00 <djazayeri> then, later in the week, we can move that into the appropriate annotation, and make it appear in the generated docs.
22:31:04 <finbrein> djazayeri: so you mean the minimum and maximum number of ticket one can claim per time is 1
22:31:13 <djazayeri> finbrein: that's just a general guideline
22:31:39 <djazayeri> if you're actually working on two things at once (e.g. you're blocked on one and waiting for a comment) you can claim two
22:31:41 <finbrein> djazayeri: I have unassigned myself from several tickets, i don't want to be greedy
22:32:00 <finbrein> ok, that is good then
22:32:40 <djazayeri> finbrein: that's why I asked you on some tickets last week if you were actively working on them
22:33:10 <finbrein> djazayeri: i'll be doing things the right way now
22:33:22 <djazayeri> no problem
22:33:50 <finbrein> i'll work on this web services task
22:46:15 <finbrein> djazayeri: qucik question, is it ok to create unit test classes for the DAO and Service layer classes/interfaces for methods that are dependent on each other.
22:46:46 <finbrein> as in ticket TRUNK-3219
22:47:20 <finbrein> I have a new patch attached. is there a way to remove the old patch?
22:50:50 <djazayeri> finbrein: if you uploaded the first patch , you should be able to delete it
22:51:08 <djazayeri> if not, just make sure you comment on the ticket saying which patch is the more recent one (ideally you'd name them so it's obvious)
22:51:44 <djazayeri> finbrein: regarding unit tests, we typically do them at the service level
22:52:19 <djazayeri> (for what it's worth this is not necessarily best-practice, but it's what we do, to get decent test coverage, without doing a ton of work)
22:52:31 <djazayeri> finbrein: see any XyzService and XyzServiceTest in core
22:53:02 <djazayeri> finbrein: if there's some reason that some behavior can't be tested at the service level, you can do a DAO test, but we rarely do those
22:53:24 <djazayeri> finbrein: also see https://wiki.openmrs.org/x/kw4z
22:53:29 <finbrein> so what would be the best practice
22:54:25 <djazayeri> finbrein: well, best-practice in the broader j2ee world is to test your service layer using mock DAOs, and and to test the DAOs directly
22:54:46 <djazayeri> we simplifly this by testing the service layer against an in-memory database
22:55:08 <djazayeri> effectively we're testing the dependent DAO and Service layer methods together
22:55:35 <djazayeri> finbrein: I've got to run now
22:55:42 <djazayeri> good luck, and catch you later
22:55:51 <finbrein> djazayeri: talk later
22:55:57 <finbrein> thanks