IRC Chat : 2012-06-17 - OpenMRS

02:56:34 *** djazayeri has joined #openmrs
02:56:34 *** ChanServ sets mode: +o djazayeri
03:03:32 *** jeedo has quit IRC
03:06:21 *** djazayeri1 has joined #openmrs
03:09:09 *** djazayeri has quit IRC
03:14:07 *** djazayeri1 is now known as djazayeri
03:15:39 *** djazayeri has left #openmrs
03:42:22 *** Maurya_ has joined #openmrs
03:58:04 *** Maurya_ is now known as maurya
07:47:20 *** goutham has joined #openmrs
07:52:35 *** dkayiwa has joined #openmrs
07:53:21 *** shasha has joined #openmrs
08:04:56 *** shasha has quit IRC
08:24:46 *** pulasthi7 has joined #openmrs
08:36:33 *** applecool has joined #openmrs
08:36:33 *** ChanServ sets mode: +v applecool
08:57:23 *** harshadura has joined #openmrs
09:01:53 *** harshadura has quit IRC
09:05:56 *** harshadura has joined #openmrs
09:08:19 *** harshadura has joined #openmrs
09:21:30 *** pulasthi7 has quit IRC
09:22:48 *** dkayiwa has quit IRC
10:06:12 *** maurya has quit IRC
10:30:34 *** applecool has quit IRC
10:36:44 *** applecool has joined #openmrs
10:36:44 *** ChanServ sets mode: +v applecool
10:59:44 *** rafa has joined #openmrs
10:59:50 *** ChanServ sets mode: +v rafa
10:59:53 <rafa> hi applecool
11:00:06 <applecool> hi rafa :)
11:00:44 <rafa> applecool: what did you want to discuss?
11:01:06 <applecool> just some instructions how do i achieve the tasks
11:04:47 <applecool> rafa:
11:06:51 <rafa> applecool: just comented on how to put another button in the same column
11:07:04 <rafa> applecool: do you have any specific questions?
11:07:19 <applecool> okay
11:08:13 <applecool> no
11:09:20 <rafa> applecool: so how can I help you?
11:10:32 <applecool> to search the packages i am using the method search which is already present in the GenericManager
11:10:56 <rafa> applecool: have you completed previous tasks?
11:11:26 <applecool> no was just asking about the search
11:11:33 <rafa> applecool: ok
11:11:36 <applecool> i will be doing them in an order
11:11:41 <applecool> as you have mentioned
11:12:05 <applecool> i need to make the fields like name,description and the version as @SearchableProperty right? in the MetadataPackage.java
11:13:02 <rafa> applecool: I'd assume yes
11:13:10 <rafa> applecool: similarily to User.java
11:13:27 <rafa> applecool: you need to annotate the class with @Searchable too
11:13:41 <rafa> applecool: and probably @SearchableId is needed as well
11:13:48 <applecool> Oh! you mean the MetadatPackage.java
11:14:03 <applecool> yes SearchableId to the getter of Id
11:14:48 <rafa> applecool: just look at the User.java and mimic all the annotations in MetadataPackage.java
11:14:48 <applecool> okay! :)
11:15:05 <applecool> :)
11:15:18 <rafa> applecool: I mean annotaitons comming from the org.compass package
11:15:50 <applecool> yes i saw that just now :)
11:17:14 <rafa> applecool: the project page is http://www.compass-project.org
11:17:20 <rafa> applecool: if you want to read more about it
11:17:27 <rafa> applecool: it uses Lucene under the hood
11:17:39 <rafa> applecool: pretty awesome search engine
11:17:48 <applecool> oh cool Thanks rafa
11:17:57 <applecool> great getting to know new things
11:18:12 <applecool> never heard of Lucene to be frank
11:18:17 <applecool> just got to know from you
11:18:19 <applecool> :)
11:18:54 <rafa> applecool: ohh it's a very big project
11:19:12 <applecool> oh :)
11:20:08 <applecool> so coming to the task two ! adding the field user to the package means i need to add the username to the packages table right
11:20:26 <applecool> or did i goof up?
11:20:53 <rafa> applecool: you need a foreign key to the user table
11:21:12 <applecool> okay
11:21:27 <rafa> applecool: just add "User user" to the MetadataPackage and Hibernate will do the magic
11:22:03 <applecool> oh :)
11:22:14 <rafa> applecool: you'll need to annotate with @OneToMany as well
11:22:42 <applecool> okay
11:24:01 <rafa> applecool: sorry @ManyToOne ;)
11:24:21 <applecool> :)
11:25:16 <rafa> applecool: read more here: http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/#entity-hibspec-entity
11:25:19 <OpenMRSBot> <http://ln-s.net/$J2o> (at docs.jboss.org)
11:25:57 <applecool> okay :)
11:35:26 *** goutham has quit IRC
11:40:52 *** applecool has quit IRC
11:47:38 *** goutham has joined #openmrs
11:50:00 <goutham> rafa: applecool said that he will be back.. it seems he has power cut at his place :)
11:50:32 *** applecool has joined #openmrs
11:50:32 *** ChanServ sets mode: +v applecool
11:50:43 <applecool> hey rafa
11:50:55 <applecool> sorry power cut got disconnected
11:51:17 <applecool> heavy rains now ! summer gone! rains came :D
11:52:21 <rafa> applecool: you must very used to power cuts :)
11:52:45 <applecool> yes! now using my net card ! no power yet! :D
11:53:19 <applecool> i told you right once that i took a net card ! :D seriously damn scared of these power cuts! :D
11:53:34 <rafa> applecool: yeah you tricked the system :D
11:53:43 <applecool> i took it because of these powercuts! :D
11:53:47 <applecool> haha tes
11:53:52 <applecool> yes*
11:54:20 <applecool> so how is your weekend? busy with code or free? :)
11:54:49 <rafa> applecool: I need to release webservices module
11:55:06 <rafa> applecool: shouldn't take me more than 2 hours
11:55:23 <applecool> oh wow cool! :)
11:56:26 <rafa> applecool: then I think I'll go cycling
11:56:34 <rafa> applecool: no rain here ;)
11:57:15 <applecool> haha! Awesome rafa your place is lot cooler than ours! no power cuts no sweat everything always cool :)
11:57:24 <applecool> i am jealous! :D
12:00:18 <applecool> rafa: i missed out the order! completed the search
12:00:18 <rafa> applecool: well, I miss hot weather sometimes...
12:00:59 <applecool> oh! you can come over to india then! You can have the taste of hot weather!
12:01:05 <rafa> applecool: today is only 20 degree and we call it summer
12:01:28 <applecool> i would receive you :) you can drop in by at my home :)
12:01:57 <applecool> oh! yea you already told me :) 20 degrees is winter here :D
12:01:59 <applecool> ;)
12:02:22 <rafa> applecool: I'll one day! I always wanted to go east.
12:02:52 <rafa> applecool: I haven't been anywhere outside Europe except for US
12:03:47 <applecool> oh! :)
12:03:57 <applecool> i havent gone outside my country :P
12:04:30 <applecool> rafa: i was wondering are you going to attend the implementers meeting this year?
12:04:35 <applecool> at phillipines
12:04:41 <applecool> east :P
12:05:05 <rafa> applecool: I've registered but I'm not yet sure if I find funds
12:05:14 <rafa> applecool: I'd love to go
12:05:27 <applecool> wow ! even i want to come!
12:05:51 <rafa> applecool: it would be great to meet you there!
12:05:58 <applecool> frist i need to register then i need to apply for the scholarship or even viceversa is fine?
12:06:22 <rafa> applecool: anyway is fine
12:08:15 <applecool> wow! :)
12:08:48 *** pushkar has joined #openmrs
12:18:03 *** kishoreyekkanti has joined #openmrs
12:25:36 *** bwolfe has joined #openmrs
12:28:00 *** pushkar has quit IRC
12:30:01 *** bwolfe has quit IRC
12:39:29 *** dkayiwa has joined #openmrs
12:41:32 <goutham> Hi dkayiwa
12:41:45 <dkayiwa> hey goutham
12:42:10 <goutham> dkayiwa: dint see you much yesterday ? :)
12:42:23 <dkayiwa> goutham: yesterday was Sabbath
12:42:35 <dkayiwa> goutham: ever heard of Seventh Day Adventists? :)
12:42:36 <applecool> whats Sabbath? :)
12:43:09 <dkayiwa> applecool: a day of rest (in a sense that we put aside all our work and dedicate it to God)
12:43:34 <applecool> oh cool dkayiwa :)
12:43:35 <goutham> dkayiwa: ya prayer :)
12:43:44 <dkayiwa> applecool: six days we work, then we rest the Seventh Day (Sabbath) - Saturday :)
12:43:45 <goutham> goutham: Kool :)
12:44:01 <applecool> dkayiwa: okay :) :)
12:44:25 <dkayiwa> goutham: applecool so no laptop on Saturday as i spend it in Church and doing Biblical activities alone :)
12:44:54 <dkayiwa> applecool: goutham are you guys Christians? :)
12:45:08 <applecool> no dkayiwa
12:45:15 <dkayiwa> applecool: ok
12:45:17 <applecool> we are hindus :)
12:45:17 <goutham> dkayiwa: no :)
12:45:22 <dkayiwa> goutham: ok
12:45:46 <applecool> most of the indians are hindus!
12:45:54 <dkayiwa> applecool: oh i see
12:45:59 <applecool> but there are many Christians too
12:46:06 <dkayiwa> applecool: ok :)
12:46:08 <applecool> and even other religions!
12:46:14 <goutham> dkayiwa: i do have christian friends , they go to church on every sunday.
12:46:15 <applecool> :)
12:46:19 <dkayiwa> applecool: oh sure
12:46:50 <dkayiwa> goutham: for Christians, it is supposed to be Saturday if they truelly follow the Bible :)
12:47:23 <goutham> goutham: Ok :)
12:54:28 <goutham> dkayiwa: i will complete the ui part of adding a property for a filter and listing them together in 2hrs
12:54:47 <goutham> dkayiwa: will you be there to review it today :)
12:55:03 *** applecoo_ has joined #openmrs
12:55:41 <dkayiwa> goutham: yes i can review it today. just send me an email when you have committed the code :)
12:57:07 <goutham> dkayiwa: right now i am adding gender and age as properties only... will add other after the presentation .. what do you say?
12:57:40 <dkayiwa> goutham: all i can say is do as much as you can before the presentation :)
12:57:47 *** applecool has quit IRC
12:58:17 <goutham> dkayiwa: ok :)
12:59:52 *** applecoo_ is now known as applecool
12:59:53 *** ChanServ sets mode: +v applecool
13:34:18 *** applecool has quit IRC
13:40:05 *** applecool has joined #openmrs
13:40:05 *** ChanServ sets mode: +v applecool
13:59:44 *** dkayiwa has quit IRC
13:59:49 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: Rest Web Services 1.0.28039 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=webservices.rest&ampversion=&amp1.0.28039>
14:09:08 *** harshadura_ has joined #openmrs
14:09:25 *** harshadura has quit IRC
14:09:31 *** harshadura_ has quit IRC
14:09:41 *** harshadura has joined #openmrs
14:16:22 *** anupre has joined #openmrs
14:16:30 *** anupre has left #openmrs
14:36:04 *** maurya has joined #openmrs
14:41:10 *** pulasthi7 has joined #openmrs
14:43:22 *** ChanServ sets mode: +v maurya
14:55:08 *** applecool has quit IRC
15:01:08 *** applecool has joined #openmrs
15:01:08 *** ChanServ sets mode: +v applecool
15:20:18 *** applecool has quit IRC
15:26:09 *** applecool has joined #openmrs
15:26:09 *** ChanServ sets mode: +v applecool
15:40:51 *** goutham has quit IRC
15:44:41 *** goutham has joined #openmrs
15:48:46 *** goutham has quit IRC
15:59:11 *** applecool has quit IRC
16:02:50 *** suri has joined #openmrs
16:12:24 *** suranga has joined #openmrs
16:12:24 *** ChanServ sets mode: +v suranga
16:12:54 *** harshadura has quit IRC
16:14:47 <suranga> pulasthi7, heloooo
16:30:25 <rfriedman> hey rafa, congrats on restws
16:31:17 <rafa> rfriedman: thank you! and congrats to you! It's our common effort :)
16:31:42 <rfriedman> rafa, do you have the address for the weekly mentor reports?
16:32:06 <rafa> rfriedman: haha you really need to bookmark that page
16:32:14 <rafa> rfriedman: it's the second time you aks :D
16:32:18 <rfriedman> i'm not on the same computer!!
16:32:25 <rafa> rfriedman: http://go.openmrs.org/wmpr
16:32:31 <rafa> rfriedman: ohh ok excused
16:32:31 *** suri has quit IRC
16:32:46 <rfriedman> that's right, i decided I'd never forget wmpr !!!
16:33:18 <rfriedman> tks
16:33:39 <rafa> rfriedman: np
16:36:22 <suranga> hi pulasthi7
16:38:12 <pulasthi7> hi suranga,
16:38:27 <suranga> pulasthi7, hi.. how are things going ? :)
16:39:20 <pulasthi7> suranga, I'm doing some debugging to find a solution for that bug
16:39:55 <pulasthi7> suranga, i hadn't test with those fields
16:40:02 <suranga> pulasthi7, cool... mm.. is it that hard ? I thought that you would simply need to change the regex pattern with an if condition
16:41:13 <pulasthi7> suranga, no, seems there's much to do. And i was travelling for the past few hours
16:41:31 <suranga> pulasthi7, aha, are you in colombo now ?
16:41:34 <suranga> great
16:41:46 <pulasthi7> the rest of the fields are taken as org.openmrs.xxx.xxx
16:42:12 <pulasthi7> where those fields are taken as (Attribute) xxxx
16:42:21 <suranga> pulasthi7, the fields you are having trouble with are all patient attributes, correct ?
16:43:03 <pulasthi7> suranga, plus the identifiers
16:44:10 <suranga> pulasthi7, lets aaume that we are dealing with a must match patient identifier... in that case, you can retreive all identifiers with the given name, and check which ones match, cant you ?
16:45:08 <pulasthi7> suranga, sorry i did't get it
16:45:30 <pulasthi7> suranga, did you mean get a value and compare it with the rest?
16:45:50 <pulasthi7> and do that for all values?
16:48:14 <suranga> pulasthi7, sorry, I might have messsed that up. can you give me a brief description of what you need to do with these attributes ?
16:48:35 <pulasthi7> suranga, i got the method which assigns those values. It's the MatchingConfigurationUtils calls
16:48:44 <pulasthi7> *class
16:49:04 <pulasthi7> generateUpdatedConfigurationEntries
16:49:29 <suranga> pulasthi7, aha... and then...
16:50:01 <pulasthi7> suranga, what i want is something like i said before.
16:50:12 <pulasthi7> get a value and compare with the rest
16:50:22 <pulasthi7> and do it for all values
16:50:35 <pulasthi7> and then count the total matches
16:51:33 <pulasthi7> but it would not be effiecient to calculate it within the program, i guess
16:52:03 <pulasthi7> better if we can do it using a single sql/hql query
16:53:02 <suranga> pulasthi7, aha... so cant you introduce a new method into the utils class, and have that method call your dao layer (which contains the hql queries?)
16:54:43 <pulasthi7> suranga, yes, I've already done that. the problem here is that the configurationEntry.filedname is assigned in a different manner for few attributes
16:56:16 <suranga> pulasthi7, sorry, I understand it now
16:56:26 <suranga> pulasthi7, pulasthi7, how hard do you think if would be for you to resolve this ?
16:57:43 <pulasthi7> suranga, not quite sure, i'll first go through the method i told before
16:58:06 <suranga> pulasthi7, good, I understand...
16:58:12 <pulasthi7> and see if there's a way i can resolve this
16:59:39 <pulasthi7> suranga, i'll let you know in either cases,
17:00:02 <pulasthi7> suranga, will you be available for about 30 mins?
17:00:11 <suranga> pulasthi7, excellent. sure
17:00:18 <suranga> pulasthi7, i'll be here :)
17:00:27 <pulasthi7> ok :)
17:03:25 *** rafa has quit IRC
17:38:42 *** pulasthi7 has quit IRC
17:38:57 *** pulasthi7 has joined #openmrs
17:48:16 *** harshadura has joined #openmrs
17:52:56 <pulasthi7> hi suranga, i figured out that it is done so, because they are dynamic fields
17:53:47 <suranga> pulasthi7, ahaaa...
17:53:56 <pulasthi7> suranga, i'll need to have the report generation code and see whether i can get anything from there
17:54:23 *** mgielow has joined #openmrs
17:54:54 <suranga> pulasthi7, but wont you have to do the calculation when creating the strategy as well ?
17:56:32 <suranga> pulasthi7, how about something like this ? lets assume that you need to evaluate a patient attribute named "Birthdate"
17:57:17 <suranga> pulasthi7, lets assume the attribute ID of birthdate is 5
17:57:54 <suranga> pulasthi7, so cant you do something like count where x.<field> not null and x.<field> !="" and x.<field>=y.<field> and x.attributeID=5;
17:59:01 <pulasthi7> suranga, you mean get the Id first and then do the query?
17:59:35 <suranga> pulasthi7, yes... if we can get the id of the attribute type or the identifier type, cant we introduce that into the sql query, and get the desired result?
18:00:03 <suranga> pulasthi7, getting the attribute type id or identifier type id is pretty easy...
18:00:32 <pulasthi7> suranga, yes, seems possible, i'll try that :)
18:01:09 <pulasthi7> suranga, but not quite sure it can be integrated with the rest of the query
18:01:17 <suranga> pulasthi7, the openmrs core is full of handy methods for this sort of thing, it may be helpful...
18:01:52 <suranga> pulasthi7, does this mean you will need to write a second query, which contains the ID field as well ?
18:02:25 <suranga> pulasthi7, so the older query manages anything thats not a attribute or identifier, which the new one manages identifiers or attributes ?
18:03:27 <pulasthi7> suranga, yes, may be, not quite sure though.
18:03:55 <pulasthi7> suranga, i'll try to add it to the existing one if possible
18:04:29 <suranga> pulasthi7, i understand. if that turns out to be impossible, you can always have a second query to manage these...
18:05:00 <suranga> pulasthi7, how much longer will you be online today ? :)
18:06:14 <pulasthi7> suranga, i'll try to finish this before i go to sleep
18:06:56 <suranga> pulasthi7, dont be too hard on yourself... I would suggest that you try to make sure that this method is feasable before you go offline tonight :-)
18:07:10 <suranga> pulasthi7, if you are sure its feasable, then we're safe :)
18:09:10 <pulasthi7> suranga, ok i'll try to find a way out. however i'll be awake till about 1 am
18:09:30 <suranga> pulasthi7, cool. you know where to find me :-)
18:13:30 *** goutham has joined #openmrs
18:15:01 <suranga> pulasthi7, the PersonServiceImpl class has getPersonAttributeTypeByName(String) which will help you
18:17:20 <pulasthi7> suranga, I'll have a look at it :-)
18:42:05 *** bwolfe has joined #openmrs
18:42:05 *** ChanServ sets mode: +o bwolfe
19:01:12 *** pulasthi7 has quit IRC
19:02:12 *** harshadura has quit IRC
19:05:06 *** pulasthi7 has joined #openmrs
19:35:01 *** goutham has quit IRC
20:28:55 *** maurya has quit IRC
20:36:27 <pulasthi7> hi suranga, are you there?
20:36:36 <suranga> hi pulasthi7
20:36:55 <suranga> pulasthi7, im always here :P
20:37:24 <pulasthi7> suranga, I think i succeeded with that.
20:37:42 <pulasthi7> suranga, got identifier types working
20:37:42 <suranga> pulasthi7, very very nice :-)
20:38:06 <suranga> pulasthi7, ah, so arrtibutes would be a similar approach too, isnt it ?
20:38:42 <pulasthi7> suranga, not sure about the query's correctness it's a huge query of about 800 characters.
20:39:32 <suranga> pulasthi7, ooops... did you build on top of the previous one, or create a second one ?
20:40:25 <pulasthi7> suranga, on top of the first, going to a second query won't work i feel.
20:40:58 <suranga> pulasthi7, hmmm... can we have a look at the query please ? :)
20:41:47 <pulasthi7> suranga, here is a sample query i captured
20:41:50 <pulasthi7> select count(distinct p1) from org.openmrs.Patient p1, org.openmrs.Patient p2, org.openmrs.Person person1, org.openmrs.Person person2, org.openmrs.PatientIdentifier pi1, org.openmrs.PatientIdentifier pi2, org.openmrs.PatientIdentifierType pit1, org.openmrs.PatientIdentifierType pit2 where p1 <> p2 and p1.patientId = person1.personId and p2.patientId = person2.personId and person1.birthdate = person2.birthdate and p1 = pi1.patient and p2 = pi2.patien
20:41:50 <pulasthi7> t and pit1 = pi1.identifierType and pit2 = pi2.identifierType and pi1.identifier = pi2.identifier and pit1.format=pit2.format and ( pit1.format = 'Old Identification Number' or pit1.format = 'OpenMRS Identification Number') order by person1.birthdate
20:43:15 <suranga> pulasthi7, mm... sorry, could you email that to me please ?
20:43:30 <pulasthi7> suranga, ok.
20:43:56 <suranga> pulasthi7, and also, I noticed that you have included 'birthdate' and openmrs identification number in the query
20:44:07 <suranga> pulasthi7, what about the other identifiers ?
20:46:20 <pulasthi7> suranga, i included 2 identifiers 'Old Identification Number' and 'OpenMRS Identification Number'
20:46:42 <pulasthi7> suranga, i also included Date of Birth from patient
20:46:58 <pulasthi7> so it has 3 blocking fields
20:47:46 <suranga> pulasthi7, cool
20:47:58 <pulasthi7> suranga, I included Date of Birth to test whether it conflict with non-identifier fields
20:48:28 <suranga> pulasthi7, I will take a look at this , and show it to james too,
20:48:56 <suranga> pulasthi7, so the mut match columns were 'Old Identification Number' and 'OpenMRS Identification Number', and the should match was Date of Birth from patient right ?
20:49:30 <pulasthi7> suranga, no, all 3 are must match,
20:49:42 <suranga> pulasthi7, ooops, sorry, you're right
20:49:56 <suranga> pulasthi7, ok, time is 2.20 am, you should head for Bed
20:50:04 <suranga> pulasthi7, we'll touch base tomorrow
20:50:22 <suranga> pulasthi7, but this is very nice work, and its great you could do it so fast !
20:51:31 <pulasthi7> suranga, credit goes to you for the help, as always :-)
20:51:55 <suranga> pulasthi7, ha ha... I did not do much :P
20:52:18 <suranga> pulasthi7, but I suppose this is why everyone wants to hire Mora students :P
21:24:25 *** pulasthi7 has quit IRC
21:29:50 *** mgielow has quit IRC
21:34:33 *** suranga has quit IRC
21:40:00 *** bwolfe has quit IRC