Wiki Spaces


Get Help from Others

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

IRC Logs

Child pages
  • 2008-08-27 - OpenMRS
Skip to end of metadata
Go to start of metadata
00:10:30 *** AndersG has joined #openmrs
00:13:40 *** AndersG has quit IRC
00:21:42 *** [mharrison] has joined #openmrs
02:51:32 *** OpenMRSBot` has joined #openmrs
02:51:33 *** OpenMRSBot has quit IRC
02:51:37 *** OpenMRSBot` is now known as OpenMRSBot
02:51:52 *** ChanServ sets mode: +o OpenMRSBot
04:21:57 *** sioraiocht has joined #openmrs
04:21:57 *** ChanServ sets mode: +v sioraiocht
06:23:21 *** TorLye has joined #openmrs
06:39:56 *** upul has quit IRC
06:47:23 *** huntp_ has joined #openmrs
06:49:37 *** huntp has quit IRC
06:53:28 *** james_regen has joined #openmrs
06:53:29 *** ChanServ sets mode: +v james_regen
07:05:54 *** bwolfe has joined #openmrs
07:05:54 *** ChanServ sets mode: +o bwolfe
07:40:21 * r0bby takes bwolfe's wallet
07:41:59 * bwolfe laughs maniacally
07:42:22 * bwolfe then remotely blows up the fake wallet
07:42:42 * r0bby dies
07:44:22 <r0bby> class time :>
08:48:52 *** atomicturtle has quit IRC
08:55:27 *** upul has joined #openmrs
09:23:39 *** atomicturtle has joined #openmrs
09:39:27 *** sioraiocht has quit IRC
09:45:49 *** nribeka_ has joined #openmrs
09:47:52 *** nribeka has quit IRC
09:49:57 *** TorLye has quit IRC
10:29:18 *** ChanServ sets mode: +v atomicturtle
10:29:25 *** atomicturtle has left #openmrs
10:31:13 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #827 (task closed): EncounterService.saveEncounter(Encounter) breaks instead of creating new Obs <> || OpenMRS Tickets: Ticket #992 (defect created): Person Attribute Type Changed By date doesn't change when Person Attribute Types are changed <>
10:34:06 *** upul has quit IRC
11:09:34 *** TorLye has joined #openmrs
11:15:49 *** sprasanna has joined #openmrs
11:16:01 <sprasanna> bwolfe: hi ben
11:16:26 <sprasanna> bwolfe: now i am almost done with that patientForm...
11:16:53 <sprasanna> bwolfe: things go fine with new address creation and updating the first address created...
11:17:01 <sprasanna> bwolfe: but in all other cases it fails
11:17:54 <sprasanna> bwolfe: i mean like if i create a new secondary address it works fine but when i try to edit it fails but this is only with the secondary addresses primary address works fine everytime...
11:58:25 <bwolfe> sprasanna: ok
11:58:34 <bwolfe> so you are not using the dwr save anymore ?
11:58:59 <sprasanna> bwolfe: no i dont i just thought i could use but that made things too complicated
11:59:09 <bwolfe> sprasanna: good to hear! :-)
11:59:17 <bwolfe> is your latest code what you committed today ?
11:59:27 <sprasanna> bwolfe: yeah thats the latest
11:59:31 <bwolfe> can I check it out and it will display this error you're saying ?
11:59:48 <sprasanna> bwolfe: but dont get scared on seeing those codes.. you might get confused also :P
11:59:59 <sprasanna> bwolfe: i need to clean up them a lot ;)
12:00:20 <bwolfe> sprasanna: ok, no problem...theres plenty of time to clean up the code and make it neat and well commented.
12:00:32 <bwolfe> I understand that it is not the "final product" yet
12:00:35 <bwolfe> brb
12:00:40 *** bwolfe has quit IRC
12:00:42 <sprasanna> bwolfe: thank you
12:06:18 *** bwolfe has joined #openmrs
12:06:18 *** ChanServ sets mode: +o bwolfe
12:08:06 <bwolfe> sprasanna: checking out addresshierarchy now...
12:08:35 <sprasanna> bwolfe: thank you ben
12:12:12 <sprasanna> bwolfe: actually with a discussion with daniel i have implented one extra thing that user can edit the hierarchy components... like sub location 1 --> "SOME NAME" as they wish... so that it becomes more flexible
12:12:53 <bwolfe> I dont understand, do you mean the label is different or the column name is different ?
12:15:08 <sprasanna> bwolfe: yeah we dont touch column names at all.. we just let the user to rename if he wishes in the manage hierarchy page so that he sees them in the newPatientForm patientDashboard and PatientForm
12:15:23 <bwolfe> I see
12:15:32 <sprasanna> bwolfe: users are not allowed to change the column names right?
12:15:46 <bwolfe> not usually
12:16:23 <sprasanna> bwolfe: like instead of having things like sub location 1 2 3 and all we let users to have their own names... only for frontend alone...
12:16:24 *** bwolfe has quit IRC
12:17:12 *** bwolfe has joined #openmrs
12:17:12 *** ChanServ sets mode: +o bwolfe
12:17:39 <sprasanna> bwolfe: like instead of having things like sub location 1 2 3 and all we let users to have their own names... only for frontend alone...
12:18:06 <bwolfe> sprasanna: right now users can define their own address layouts in the openmrs-servlet.xml
12:18:27 <bwolfe> that allows them to label each with whatever they want
12:18:40 <sprasanna> bwolfe: with addresshierarchy module they can just do that in the manage hierarchy page
12:18:48 <bwolfe> but its not easy for an end-user or end-admin to edit the openmrs-servlet.xml
12:19:53 <sprasanna> bwolfe: yeah thats why we came up with such an idea.. he can either have sub location 1 2 3 etc or country state district taluk panchayat village etc etc
12:20:02 <bwolfe> right
12:20:04 <bwolfe> good
12:20:09 <sprasanna> :)
12:20:30 <bwolfe> I would like to see those xml address layouts in openmrs-servlet.xml move to global properties
12:21:08 <sprasanna> bwolfe: wouldnt that make things complicated?
12:21:23 <bwolfe> how so ?
12:22:16 <sprasanna> bwolfe: you mean just grabbing the things from openmrs-servlet.xml and dropping them into global properties?
12:22:52 <bwolfe> sprasanna: yes, taking what is there now, and putting it in everyone's database in the global property table
12:23:05 <bwolfe> then make a jsp page that lets a user add/edit each of those
12:23:31 <bwolfe> right now, in order to add/edit an address layout, you have to edit openmrs-servlet.xml and _rebuild_ openmrs....
12:23:43 <bwolfe> end-admins do _not_ want to rebuild openmrs! :-)
12:24:24 <sprasanna> bwolfe: yeah you are right... even in addresshierarchy module when you remove the module everything goes back to actual architecture...
12:24:57 *** nribeka_ has quit IRC
12:25:08 <sprasanna> bwolfe: how long did it take for you to build this entire openmrs system?
12:25:33 <sprasanna> sprasanna: last week i had a presentation in my class and people were wondering about things done in openmrs
12:26:29 <bwolfe> sprasanna: I started with openmrs exactly 3 years ago in 4 days
12:26:43 <bwolfe> sprasanna: but it wasn't just me...there are 5-6 other guys that also contribute a lot
12:26:53 <bwolfe> what were they wondering about openmrs?
12:27:15 <bwolfe> were they wanting to do projects for openmrs?? :-D
12:27:22 <sprasanna> sprasanna: they were just amazed by the way everything organized...
12:27:50 <bwolfe> are you talking to yourself sprasanna ? :-)
12:28:06 <bwolfe> the way the code is organized or the way the developers are organized ?
12:28:23 <sprasanna> bwolfe: yeah few of my friends are looking out for the projects in the projects page... hopefully you can expect 5 ppl from my class by next month :)
12:28:36 <bwolfe> sprasanna: very nice. well done!!
12:28:52 <bwolfe> sprasanna: I've been adding more small projects to the projects page recently for just htose kinds of people
12:28:56 <sprasanna> bwolfe: everything is really fine with openmrs... i cant find even a small scratch anywhere..
12:29:24 <bwolfe> haha, you're too kind. there are many small scratches...some are just too small to see without being close to it!
12:29:47 <bwolfe> sprasanna: you can also tell them to watch for minor or trivial tickets
12:30:06 <sprasanna> bwolfe: actually we have a cancer institute next to our college campus thinking about deploying openmrs there... but thats a government hospital so thats not so easy but we can implement this in our college hospital..
12:31:15 <sprasanna> bwolfe: yeah i will tell them to have a look at tickets...
12:31:59 <sprasanna> bwolfe: but even i dont have full knowledge about openmrs... its very vast actually...
12:32:43 <bwolfe> sprasanna: yeah, its getting to the point where even _I_ don't know everything about openmrs
12:33:06 <sprasanna> bwolfe: hehe...
12:33:16 <sprasanna> bwolfe: you are such a liar always :P
12:40:15 <bwolfe> sprasanna: two problems:
12:40:27 <bwolfe> 1) the "preferred" address is not showing up as the first one
12:40:29 <sprasanna> bwolfe: oh... thanks finally you found it
12:40:46 <sprasanna> oh,... i dint notice that
12:40:54 <sprasanna> i will do that right away
12:41:00 <bwolfe> 1) or maybe thats a different problem...but either way, the "preferred" address is always first in the patients .getAddresses() list
12:41:27 <bwolfe> 2) the reason its not saving is because you dont' have the right name attribute in the <input name="_____"> boxes
12:42:04 <bwolfe> for the second address in the patient, the names should be address[1].____
12:42:14 <sprasanna> bwolfe: actually im renaming everything dynamically to addresses[0].country etc etc
12:42:17 <bwolfe> just like for the first address for each patients its address[0].____
12:42:43 <sprasanna> bwolfe: it should be addresses right?? or should it be address??
12:43:10 <bwolfe> you are right, it should be addresses[1]....
12:44:06 <sprasanna> bwolfe: acutally im renaming everything dynamically when page loads addresses[0] for first address and addresses[1] for second and so one
12:44:12 <sprasanna> *so on
12:44:38 <bwolfe> but I'm not seeing addresses[1] for hte second one
12:44:43 <bwolfe> I see id1, etc
12:45:13 <sprasanna> bwolfe: actually id10 is id... in name you can find addresses[1]
12:45:18 <bwolfe> id10, id11 are address1 and address2 for the patient's second address
12:45:50 <bwolfe> ah yes, you ar eright again, I was looking at the "th" tag
12:46:28 <sprasanna> actually with addresses[0] everything just works find
12:46:28 <bwolfe> as and aside: "name" is not valid on a "th", is it ?
12:46:59 <sprasanna> bwolfe: not valid? is it so?
12:47:42 <sprasanna> bwolfe: all the problems comes when addresses are updated from addresses[1] [2] and so on
12:51:38 <bwolfe> sprasanna: the addresses[1] etc elements, are they in a div with id "addressData" ?
12:52:25 <sprasanna> bwolfe: yeah addresses[1] with address1Data addresses[2] with address2Data
12:53:07 <bwolfe> sprasanna: ok, well, look at the main <form> element on the editPatient page
12:53:34 <bwolfe> it has an onSubmit="removeBlankData()" call that is called when the user clicks "save"
12:53:45 <bwolfe> it deletes all html elements with id="addressData"
12:54:21 <bwolfe> (it is meant to delete the "empty" address element that is used by javascript to create an empty address for a user if they need it)
12:55:51 <sprasanna> bwolfe: yeah i get that and the when we click "new add address" the data is pulled from addressData right?
12:56:20 <bwolfe> sprasanna: yes.
12:56:57 <bwolfe> sprasanna: but the editPatient form removes all elements with id=addressData. so if you are naming your div that contains address[1]... "addressData", then it gets removed before the form is submitted
12:57:39 <sprasanna> bwolfe: no no i am not naming addresses[1] under addressData.. i place it under address1Data...
12:57:50 <bwolfe> I see
12:57:50 <bwolfe> ok
12:58:06 <sprasanna> bwolfe: under addressData elements will have only names like country stateProvince but not addresses
12:58:25 <sprasanna> bwolfe: and i guess thats the way it use to be in the actual page
12:58:43 <bwolfe> yeah
12:58:45 <bwolfe> you ar eright
12:59:59 <sprasanna> bwolfe: so now addresses[0] and elements in addressData i mean for new address creation works fine.. but the rest fails :(
13:05:30 *** nribeka has joined #openmrs
13:05:39 <bwolfe> sprasanna: seems like the addresses[0] is getting saved on top of addresses[1]
13:06:22 <sprasanna> bwolfe: oh no... how come thats possible?? because the patient form controller takes everything in an array na
13:13:46 <bwolfe> sprasanna: you have <input value="" name="addresses[1].country" id="addresse[0].country" type="text">
13:13:55 <bwolfe> does that effect anything ?
13:14:02 <bwolfe> are you getting things by id before submission ?
13:14:19 <bwolfe> all of you ids are missing a last "s" too
13:14:45 <sprasanna> bwolfe: actually im not... actually i dont need ids at all just for identifications i have that now...
13:15:11 <sprasanna> bwolfe: actually form controller pulls everything with names so we need not bother about ids
13:15:19 <bwolfe> right
13:15:28 <bwolfe> ok
13:15:44 <bwolfe> I just didn' tknow if you were doing some javascript that was copying things, etc
13:18:17 <sprasanna> bwolfe: no i thought i could do it that way but that was making things so complicated so im trying to fit it with the controller
13:18:25 <sprasanna> bwolfe: actually thats the best way
13:41:52 *** sprasanna has quit IRC
14:05:29 *** sioraiocht has joined #openmrs
14:05:29 *** ChanServ sets mode: +v sioraiocht
14:46:11 *** bwolfe_ has joined #openmrs
14:46:11 *** ChanServ sets mode: +o bwolfe_
14:48:13 *** bwolfe has quit IRC
14:48:38 *** bwolfe_ is now known as bwolfe
15:15:30 *** james_regen has quit IRC
15:39:28 *** nribeka has quit IRC
15:52:34 *** sioraiocht has quit IRC
16:20:55 *** nribeka has joined #openmrs
16:32:13 *** bwolfe has quit IRC
16:41:58 *** Keelhaul has quit IRC
17:15:44 *** bwolfe has joined #openmrs
17:15:44 *** ChanServ sets mode: +o bwolfe
17:30:34 *** TorLye has quit IRC
19:15:23 *** atomicturtle has joined #openmrs
19:28:22 *** OpenMRSBot has joined #openmrs
19:37:05 *** OpenMRSBot has joined #openmrs
19:41:07 *** OpenMRSBot has joined #openmrs
19:44:55 *** OpenMRSBot has joined #openmrs
19:50:01 *** OpenMRSBot has joined #openmrs
19:56:37 *** OpenMRSBot has joined #openmrs
20:00:57 *** OpenMRSBot has joined #openmrs
20:00:57 <bwolfe> just me and the bot ??
20:00:59 <bwolfe> wow
20:01:04 <bwolfe> echo
20:01:05 <bwolfe> echo
20:01:08 <bwolfe> echo
20:01:10 *** nribeka has joined #openmrs
20:01:10 *** atomicturtle has joined #openmrs
20:01:10 *** huntp_ has joined #openmrs
20:01:10 *** [mharrison] has joined #openmrs
20:01:10 *** jacobb has joined #openmrs
20:01:10 *** Echidna has joined #openmrs
20:01:10 *** r0bby has joined #openmrs
20:01:10 *** hexmode has joined #openmrs
20:01:10 *** sets mode: +v r0bby
20:01:10 <bwolfe> echo
20:01:12 <bwolfe> hellooooooooo
20:01:13 <bwolfe> oooooooo
20:01:16 <bwolfe> ooooooo
20:01:18 <bwolfe> ooooo
20:01:19 <bwolfe> o
20:01:38 <nribeka> alone bwolfe :P
20:01:51 <bwolfe> I was there for a while
20:01:58 <bwolfe> just me and the bot :-)
20:02:08 <nribeka> hahaha ...
20:02:26 <nribeka> how's the junit going?
20:03:50 <bwolfe> its done
20:03:59 <bwolfe> the junit-a-thon anyway
20:03:59 <nribeka> i wish i'm good at writing test. any good point out for writing junit bwolfe?
20:04:03 <nribeka> i mean something like books or wikis
20:04:25 <bwolfe> those links I sent to the dev list are good
20:04:29 <bwolfe> they're pretty simple
20:04:38 <bwolfe> !junit
20:04:38 <OpenMRSBot> bwolfe: "junit" --- OpenMRS uses unit testing. See and
20:05:24 <nribeka> i like the idea of behavior testing :D
20:14:02 * nribeka is listening some old song :D
20:44:21 <bwolfe> nribeka: is that what you were wanting...or were you wanting something else to read?
20:45:14 <nribeka> yeps. i'm reading the best practice right now
20:45:25 <nribeka> sometime i just clueless on what to test
20:45:49 <nribeka> i'm clueless on what to write in the test bwolfe
20:46:11 <bwolfe> nribeka: ah yes
20:47:26 <bwolfe> well, thats why we're going to annotate the code with @should statements that say what needs tested
20:47:52 <bwolfe> then you could come along later and write a quick unit test that implements one of those @should 's if you wanted to :-)
20:47:53 <nribeka> @should will be put in the api methods?
20:47:59 <bwolfe> yeah
20:48:10 <nribeka> ah ic ic
20:48:23 <nribeka> how would you decide on where to put the should bwolfe?
20:49:43 <bwolfe> what do you mean ?
20:50:33 <bwolfe> nribeka: is pretty good too
20:50:38 <OpenMRSBot> <> (at
20:50:53 <nribeka> bookmarking
20:52:22 <nribeka> say we have 10 method in our class. do we need to test all of them bwolfe?
20:52:46 <bwolfe> yep, probably
20:52:51 <bwolfe> probably a few tests for each of them
20:53:55 <nribeka> a few test? can you explain more on that bwolfe? :D
20:54:10 <nribeka> *late night junit with bwolfe*
20:54:29 <bwolfe> each method probably has a few different "behaviors"
20:54:44 <bwolfe> meaning that each method can be used with a few different parameters, a few different environments, etc
20:55:38 <bwolfe> so you have to write the "happy test" where the parameters and environment are all what you would expect them to be
20:56:15 <bwolfe> and then you have a write a test where you get bad input from the user or the database has some bad data
20:57:07 <nribeka> wow ...
20:57:31 <nribeka> so to sum it up. the rule of thumb is (more-less):
20:58:27 <nribeka> - write few test for EACH method based on the input parameters and test it also using bad input
20:59:20 <bwolfe> yep
20:59:24 <bwolfe> thats it exactly
20:59:34 <bwolfe> it takes 20 milliseconds for a test to run
20:59:52 <nribeka> wow ... so there's tons of test to write then? *wheeeww*
21:00:05 <bwolfe> so having a whole lot of them is not bad
21:00:13 <bwolfe> yep, tons of tests to write
21:01:38 <nribeka> how's the junit-a-thon? how many test do we get?
21:02:26 <bwolfe> well, we didn't end up writing that many
21:02:41 <bwolfe> as paul said, us writing tests would have "been peeing in the ocean"
21:02:42 <bwolfe> :-)
21:03:08 <bwolfe> but we did figure out a process for testing and a way forward for other devs (like you and other students) to help us with it!
21:06:43 <nribeka> ah sure :)
21:06:54 <nribeka> will be happy to help :D
21:09:09 <nribeka> hope i can learn lots about junit hehehe
21:15:56 <bwolfe> eh, if you know java, you know junit
21:21:10 *** upul has joined #openmrs
21:54:45 <nribeka> i know junit :D
21:54:54 <nribeka> *was on phone*
22:07:51 *** bwolfe has quit IRC
22:46:54 *** nribeka has quit IRC
23:09:38 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1002 (defect created): Add commenting to concepts in occ <> || OpenMRS Tickets: Ticket #1001 (enhancement created): Add "I don't like this concept" button in occmodule <> || OpenMRS Tickets: Ticket #1000 (task created): Create a scheduled task to "send concpets to occ" in occmodule <> || OpenMRS Tickets: Ticket #999 (defect created): Fix occ concept name display <> || OpenMRS Tickets: Ticket #998 (task created): Create occ page to see the just uploaded concepts <> || OpenMRS Tickets: Ticket #997 (task created): Add ability to browse occ results in occmodule <> || OpenMRS Tickets: Ticket #996 (task created): Fix OCC Concept results/listing to be smart about mappings <> || OpenMRS Tickets: Ticket #995 (defect created): Fix the OCC Database connection timeout <> || OpenMRS Tickets: Ticket #994 (task created): Create a new Auto Mapping page <> || OpenMRS Tickets: Ticket #993 (task created): Write "Add User" capability to OCC <>
23:45:01 *** huntp_ has quit IRC
  • No labels