| 00:00:22 | *** nribeka has joined #openmrs |
| 00:00:34 | *** ChanServ sets mode: +v nribeka |
| 00:07:48 | <djazayeri> andreapat: now you need to test to make sure that it doesn't fail if you re-run it after already dropping the constraint... |
| 00:09:09 | <andreapat> djazayeri, reading wiki to figure out - is this all I have to do to remove null constraint |
| 00:09:16 | <djazayeri> andreapat: I think so |
| 00:09:37 | <andreapat> djazayeri, don't have to actually do the sql? |
| 00:09:56 | <djazayeri> andreapat: exactly, we do our db updates via liquibase xml instead |
| 00:10:20 | <andreapat> djazayeri, very cool! |
| 00:31:36 | *** andreapat has quit IRC |
| 01:11:56 | *** djazayeri1 has joined #openmrs |
| 01:14:02 | *** djazayeri has quit IRC |
| 01:15:22 | *** nribeka has quit IRC |
| 01:49:00 | *** sgithens has quit IRC |
| 02:23:05 | *** sgithens has joined #openmrs |
| 03:50:19 | *** djazayeri1 has quit IRC |
| 09:07:10 | *** kavuri has joined #openmrs |
| 09:18:26 | *** kavuri has quit IRC |
| 09:18:46 | *** djazayeri has joined #openmrs |
| 09:18:46 | *** ChanServ sets mode: +o djazayeri |
| 09:50:37 | *** kavuri has joined #openmrs |
| 09:59:42 | *** didymo has quit IRC |
| 10:20:34 | *** djazayeri has quit IRC |
| 11:00:25 | *** kavuri has quit IRC |
| 11:48:16 | *** robbyoconnor has joined #openmrs |
| 11:48:16 | *** ChanServ sets mode: +v robbyoconnor |
| 12:12:46 | *** rafa has joined #openmrs |
| 12:12:46 | *** ChanServ sets mode: +v rafa |
| 12:47:14 | *** Vishrut has joined #openmrs |
| 13:00:14 | *** Vishrut has quit IRC |
| 14:12:22 | *** rafa has quit IRC |
| 15:42:33 | *** kavuri has joined #openmrs |
| 16:26:06 | *** sgithens has quit IRC |
| 16:43:43 | *** sgithens has joined #openmrs |
| 16:48:41 | *** kavuri has quit IRC |
| 17:07:43 | *** kavuri has joined #openmrs |
| 17:13:22 | *** robbyoconnor has quit IRC |
| 17:19:02 | *** djazayeri has joined #openmrs |
| 17:19:02 | *** ChanServ sets mode: +o djazayeri |
| 17:41:49 | *** dkayiwa has joined #openmrs |
| 17:47:42 | <dkayiwa> hi kavuri |
| 17:47:52 | <kavuri> dkayiwa: hi |
| 17:48:21 | <dkayiwa> kavuri: how is it going? |
| 17:51:18 | <kavuri> dkayiwa: trying to debug the issue related to post to /obs if the "value" is at the beginning of the json msg |
| 17:51:32 | <dkayiwa> kavuri: ok |
| 17:52:17 | <kavuri> dkayiwa: the problem is in ObsResource.java:setValue() |
| 17:52:31 | <kavuri> dkayiwa: and a conversionexception is thrown at line 312 |
| 17:52:58 | <dkayiwa> kavuri: oh i seeeeeeee |
| 18:06:55 | <kavuri> djazayeri: No matter what, I get classcastexception while trying to use the set with setGroupMembers |
| 18:22:06 | <kavuri> dkayiwa: I think the problem could be that the concept object is not being set which is resulting in an invocationTargetException |
| 18:22:44 | <dkayiwa> kavuri: oh i see |
| 18:23:15 | <kavuri> dkayiwa: guess these are set in DelegatingCrudResource.java? |
| 18:23:33 | <dkayiwa> kavuri: not sure. would need to look at it |
| 18:27:18 | <djazayeri> kavuri: can you put a breakpoint there, use the debugger, and see what the actual type of the collection is? |
| 18:27:39 | <kavuri> djazayeri: the error message says it is LinkedHashMap |
| 18:28:08 | <djazayeri> kavuri: the value being passed in is a linkedhashmap? |
| 18:28:19 | <djazayeri> the second argument to setGroupMembers? |
| 18:28:30 | <kavuri> djazayeri: it is an ArrayList |
| 18:29:11 | <djazayeri> kavuri: okay, and its contents are LinkedHashMaps? |
| 18:29:39 | <kavuri> djazayeri: ok, not sure about that. I was assuming it would be a Obs |
| 18:32:12 | <djazayeri> kavuri: gotta run now. |
| 18:32:23 | <kavuri> djazayeri: ok, later... |
| 18:32:50 | <djazayeri> kavuri: can you post a patch, or a branch on github, that adds a (failing) unit test on ObsController that tries to create an obs + group? |
| 18:32:51 | <dkayiwa> kavuri: i can try continue with you on it :) |
| 18:33:07 | <kavuri> djazayeri: sure, will do that |
| 18:33:10 | <djazayeri> kavuri: if you don't get it solved now with dkayiwa, post that, and I'll try to take a look. |
| 18:33:11 | <kavuri> dkayiwa: thanks |
| 18:33:26 | <kavuri> djazayeri: ok |
| 18:37:37 | <dkayiwa> kavuri: do you have the unit test? |
| 18:37:46 | <kavuri> dkayiwa: I am creating one |
| 18:37:52 | <dkayiwa> kavuri: ok |
| 18:37:56 | <kavuri> dkayiwa: until now I was using a curl call |
| 18:38:02 | <dkayiwa> kavuri: ok |
| 18:39:35 | *** dkayiwa has quit IRC |
| 18:46:21 | *** dkayiwa has joined #openmrs |
| 18:48:51 | <kavuri> dkayiwa: created the test case |
| 18:49:16 | <dkayiwa> kavuri: can u pastebin it? |
| 18:49:31 | <kavuri> dkayiwa: shall I create a github pull request? |
| 18:49:59 | <dkayiwa> kavuri: just pastebin it |
| 18:50:04 | <kavuri> dkayiwa: ok |
| 18:50:30 | <kavuri> dkayiwa, djazayeri: http://pastebin.com/rkSvCkTP |
| 18:51:05 | <kavuri> dkayiwa: this is in ObsControllerTest.java |
| 18:51:26 | <dkayiwa> kavuri: ok |
| 18:53:28 | <dkayiwa> kavuri: is that in the restws module |
| 18:53:36 | <kavuri> dkayiwa: yes |
| 18:55:28 | <dkayiwa> kavuri: but the test passes :) |
| 18:55:53 | <kavuri> dkayiwa: yes, I have not added enough asserts |
| 18:56:13 | <kavuri> dkayiwa: if you look into the database, then you will see that the obs_group_id of the observations will be null |
| 18:56:18 | <dkayiwa> kavuri: ok will tell me after you have a failing test :) |
| 19:01:00 | <kavuri> dkayiwa: this one should fail |
| 19:01:02 | <kavuri> dkayiwa: http://pastebin.com/htDrCbUR |
| 19:01:10 | <dkayiwa> kavuri: ok |
| 19:02:21 | <dkayiwa> kavuri: it passes too :) |
| 19:02:28 | <kavuri> djazayeri: webservices.rest is still on svn, so will not be able to create a pull request |
| 19:02:36 | <kavuri> djazayeri: rather replying to the mail thread with the patch |
| 19:04:43 | <kavuri> dkayiwa: hmm..if the method isObsGrouping() is correct, then it should return false, since there is no reference from the group parent to its children |
| 19:04:50 | <kavuri> dkayiwa: else, I would assume that the method is wrong |
| 19:05:06 | <dkayiwa> kavuri: the test passes |
| 19:05:28 | <dkayiwa> kavuri: test should fail |
| 19:05:46 | <kavuri> dkayiwa: the reason is that the assert is not failing |
| 19:05:50 | <dkayiwa> kavuri: test passing means all is well |
| 19:06:07 | <kavuri> dkayiwa: and I am suspect that the method isObsGrouping itself is wrong |
| 19:06:28 | <dkayiwa> kavuri: write a test proving its wrong |
| 19:06:39 | <dkayiwa> kavuri: then we start to fix it |
| 19:07:08 | <kavuri> dkayiwa: I do not know how to use the right api to prove that the child observations do not have the obs_group_id set |
| 19:07:13 | <kavuri> dkayiwa: I am new to the api |
| 19:09:09 | <kavuri> dkayiwa: but the problem is real, and I demonstrated it to djazayeri y'day |
| 19:09:26 | <dkayiwa> kavuri: ok |
| 19:10:06 | <dkayiwa> kavuri: this test create a proper obs grouping |
| 19:10:18 | <dkayiwa> kavuri: i see 4 obs in total |
| 19:10:32 | <dkayiwa> kavuri: where one obs is the parent for the three |
| 19:10:37 | <kavuri> dkayiwa: internally in the database, the obs_group_id of the children observations will not be set |
| 19:13:02 | <dkayiwa> kavuri: can you pastebin for me the post data i should use on the restws test page? |
| 19:13:54 | <kavuri> dkayiwa: http://pastebin.com/ngzPfyEr |
| 19:14:06 | <dkayiwa> kavuri: ok |
| 19:14:09 | <kavuri> you will have to modify the uuid's of the person, concept and location |
| 19:14:17 | <kavuri> dkayiwa: encounter is optional, so you can remove it |
| 19:14:28 | <dkayiwa> kavuri: ok |
| 19:15:24 | <dkayiwa> kavuri: have you actually tried out this in the test page? |
| 19:15:49 | <kavuri> dkayiwa: I have used curl, which is same as test page |
| 19:16:04 | <dkayiwa> kavuri: can you reproduce the error on the test page? |
| 19:16:12 | <kavuri> dkayiwa: sure |
| 19:16:33 | <dkayiwa> kavuri: after that, just copy and paste for me what you put in the POST data field |
| 19:16:43 | <dkayiwa> using pastebin |
| 19:16:54 | <kavuri> dkayiwa: the POST of the obs group will work, but the corresponding GET will not get the groupMembers |
| 19:17:15 | <dkayiwa> kavuri: will the database be update properly? |
| 19:17:21 | <kavuri> dkayiwa: no |
| 19:17:30 | <dkayiwa> kavuri: ok try the test page and confirm it |
| 19:25:57 | <kavuri> dkayiwa: how do you want me to post the result? |
| 19:26:08 | <dkayiwa> kavuri: you do not have to |
| 19:26:35 | <dkayiwa> kavuri: the unit test should simply test that childObs.getGroup != null |
| 19:26:37 | <kavuri> dkayiwa: for the obs group that I just created, the result for "groupMembers NULL" |
| 19:26:48 | <kavuri> dkayiwa: ok |
| 19:27:19 | <kavuri> dkayiwa: you tried that and it fails? |
| 19:27:36 | <dkayiwa> kavuri: just looked at the child obs in the debugger :) |
| 19:28:12 | <kavuri> dkayiwa: creation of the observations is not a problem, but the obs_group_id of the children is null |
| 19:28:21 | <kavuri> dkayiwa: so they are not related to the parent at all |
| 19:28:47 | <kavuri> djazayeri: because of which, if you perform a GET on the parent observation, then groupMembers is returned as NULL |
| 19:28:53 | <kavuri> dkayiwa: ^^ |
| 19:29:30 | <dkayiwa> kavuri: and all your want is the code to set obs_group_id for each child? |
| 19:29:39 | <kavuri> dkayiwa: yes |
| 19:30:08 | <kavuri> dkayiwa: for which djazayeri proposed to add a setGroupMembers in ObsResource.java, but I am facing issues with the type of the value object |
| 19:30:17 | <kavuri> dkayiwa: I sent the patch to the mailing list |
| 19:30:38 | <kavuri> dkayiwa: but basically the idea is what you mentioned |
| 19:31:23 | *** kjoseph has joined #openmrs |
| 19:31:38 | <dkayiwa> kavuri: in which method do you set the groupmembers? |
| 19:31:40 | <kjoseph> dkayiwa:hi |
| 19:31:44 | <dkayiwa> hi kjoseph |
| 19:31:51 | <kavuri> dkayiwa: setGroupMembers |
| 19:32:00 | <kavuri> dkayiwa: but in the current code (in trunk) there is no such method |
| 19:32:10 | <kjoseph> djazayeri: hi |
| 19:32:18 | <kavuri> dkayiwa: so as per djazayeri directions, added a method |
| 19:32:24 | <dkayiwa> kavuri: can you so what did you change? |
| 19:32:41 | <kavuri> dkayiwa: I sent the patch in the mailing list |
| 19:35:34 | <kavuri> dkayiwa: its already quite late here..will have to bid goodbye for the day |
| 19:35:43 | <kavuri> dkayiwa: 0100hrs |
| 19:35:48 | <kjoseph> dkayiwa: what exactly am i supposed to enter through command line as group id from https://wiki.openmrs.org/display/docs/Using+the+Module+Maven+Archetype or i should use the given default id |
| 19:35:49 | <OpenMRSBot> <http://ln-s.net/9$wo> (at wiki.openmrs.org) |
| 19:35:49 | *** djazayeri has quit IRC |
| 19:35:51 | <dkayiwa> kavuri: ok will resume when you are back :) |
| 19:36:09 | <kavuri> dkayiwa: but if you have sometime, pls. take a look into it |
| 19:36:18 | <dkayiwa> kavuri: ok |
| 19:36:35 | <kavuri> dkayiwa: have been struggling with it for quite sometime now |
| 19:37:11 | <dkayiwa> kavuri: ok will send my findings to the mailing list before i sleep :) |
| 19:37:22 | <kavuri> dkayiwa: great! thanks |
| 19:37:34 | <dkayiwa> kjoseph: is it now working? |
| 19:38:24 | <kjoseph> dkayiwa: yes and am at the step when am supposed to input group id, |
| 19:38:57 | <dkayiwa> kjoseph: so can you first respond to the mailing list that it worked and what was it that made it work? |
| 19:39:33 | <dkayiwa> kjoseph: that way other newbies struggling with the same will share the answer by searching the mails |
| 19:39:48 | *** kavuri has quit IRC |
| 19:40:23 | <kjoseph> dkayiwa: okay, but still you may help me to do that as i continue |
| 19:40:47 | <dkayiwa> kjoseph: first send the email and tell me when sent :) |
| 19:50:58 | <kjoseph> dkayiwa:am through with it please and now waiting upon your reply |
| 19:53:59 | <dkayiwa> kjoseph: oj |
| 19:54:01 | <dkayiwa> ok |
| 19:54:33 | <dkayiwa> kjoseph: group id is: org.openmrs.module |
| 19:55:46 | <kjoseph> dkayiwa: then how about artifact id |
| 19:57:23 | <dkayiwa> kjoseph: artifact id can be the name of the module you want to create. For instance: testmodule |
| 19:57:36 | <dkayiwa> kjoseph: so you can for now put the value of: testmodule |
| 19:58:18 | <kjoseph> dkayiwa: how about version |
| 19:58:30 | <dkayiwa> kjoseph: for that you can put: 1.0 |
| 19:59:13 | <kjoseph> dkakyiwa: module name |
| 19:59:43 | <dkayiwa> kjoseph: something like: Test Module |
| 19:59:56 | <kjoseph> dkayiwa: |
| 20:00:31 | <kjoseph> dkayiwa: Module description: |
| 20:01:02 | <dkayiwa> kjoseph: something like: Learning how to develop an OpenMRS module |
| 20:01:49 | <kjoseph> dkayiwa: Module author: == joseph!!! |
| 20:02:04 | <dkayiwa> kjoseph |
| 20:02:57 | <kjoseph> dkayiwa: OpenMRS version to depend on |
| 20:03:12 | <dkayiwa> kjoseph: 1.9.0 |
| 20:03:16 | *** djazayeri has joined #openmrs |
| 20:03:16 | *** ChanServ sets mode: +o djazayeri |
| 20:04:18 | <kjoseph> dkayiwa: Do you want to add an admin page link: (y/n) y |
| 20:04:28 | <dkayiwa> kjoseph: yes |
| 20:04:33 | <dkayiwa> kjoseph: y |
| 20:04:55 | <kjoseph> dkayiwa: Do you want to add a service layer: (y/n) y: |
| 20:05:02 | <dkayiwa> kjoseph: yes |
| 20:05:24 | <kjoseph> dkayiwa: Service name: Test Module: |
| 20:05:42 | <dkayiwa> kjoseph: TestModuleService |
| 20:06:11 | <kjoseph> dkayiwa: Model object name: Test Module |
| 20:06:26 | <dkayiwa> kjoseph: TestModule |
| 20:06:50 | <kjoseph> dkayiwa: Do you want to add another module to depend on: (y/n) n |
| 20:07:01 | <dkayiwa> kjoseph: no |
| 20:07:34 | <kjoseph> dkayiwa: Ready to create a module. Are the above values correct: (y/n) = y !!! |
| 20:07:45 | <dkayiwa> kjoseph: yes |
| 20:09:12 | <dkayiwa> kjoseph: have you also read this page? https://wiki.openmrs.org/display/docs/Creating+Modules |
| 20:11:32 | <dkayiwa> kjoseph: have you? |
| 20:12:08 | <kjoseph> dkayiwa: i had lightly went throough it before |
| 20:12:27 | <dkayiwa> kjoseph: all of it? |
| 20:13:32 | <kjoseph> dkayiwa: okay: required to leave campass, please thank you alot and have agood night |
| 20:13:54 | <dkayiwa> kjoseph: when you get back online, read through it again |
| 20:14:02 | <dkayiwa> kjoseph: and its child pages at the bottom |
| 20:14:15 | <dkayiwa> kjoseph: it will give you a background on modules |
| 20:14:20 | <dkayiwa> kjoseph: ok? |
| 20:14:20 | <kjoseph> dkayiwa: okay |
| 20:14:28 | <dkayiwa> kjoseph: ok have a good night |
| 20:14:39 | *** kjoseph has quit IRC |
| 20:23:54 | *** sgithens has quit IRC |
| 20:28:49 | *** robbyoconnor has joined #openmrs |
| 20:28:49 | *** ChanServ sets mode: +v robbyoconnor |
| 21:34:43 | *** dkayiwa has quit IRC |
| 21:35:28 | *** dkayiwa has joined #openmrs |
| 21:47:44 | *** dkayiwa has quit IRC |
| 21:50:12 | *** dkayiwa has joined #openmrs |
| 23:05:33 | *** dkayiwa has quit IRC |