Hi,
Am working on an hospital information system using couchdb and node.js. For this I need to get the list and number of patients in a given time period - usually a day. I can get the patients who were admitted or discharged in that time period. How to get the list of patients who were admitted earlier than the start of the period but who got discharged after the time period or who are not discharged yet?
Am currently using couchdb-lucene to get this list but would like to know if there is a way where I can get it from a view - that way I can just reduce and get the number of patients in a given period. I was wondering if I should use a scheduler that will create a new 'under_treatment' doc for every day till the patient is discharged! Or is there a simpler way?
Thanks in advance, mano
-- Lord, give us the wisdom to utter words that are gentle and tender, for tomorrow we may have to eat them. -Sen. Morris Udall
Manokaran K's gravatar image asked Apr 1 2013 at 09:33 in Couchdb-User by Manokaran K

1 Answers

Use Cron(http://en.wikipedia.org/wiki/Cron) for this =)
2013/4/1 Manokaran K Hi, > > Am working on an hospital information system using couchdb and node.js. For > this I need to get the list and number of patients in a given time period - > usually a day. I can get the patients who were admitted or discharged in > that time period. How to get the list of patients who were admitted earlier > than the start of the period but who got discharged after the time period > or who are not discharged yet? > > Am currently using couchdb-lucene to get this list but would like to know > if there is a way where I can get it from a view - that way I can just > reduce and get the number of patients in a given period. I was wondering if > I should use a scheduler that will create a new 'under_treatment' doc for > every day till the patient is discharged! Or is there a simpler way? > > Thanks in advance, > mano > > -- > Lord, give us the wisdom to utter words that are gentle and tender, for > tomorrow we may have to eat them. > -Sen. Morris Udall >
answered Apr 1 2013 at 09:38 by Александр Опак

Related Discussions

  • How To Split The Data Over A Period Of Time. in Couchdb-user

  • Hi, My application uses couch-db for storing events. Daily on an average my database size increases up-to 4GB. So If I keep the database for 3-6 months my disk space get reduced. What is the best strategy for 1) taking the backup of couch-db after a period of time. 2) how to retrieve the data from backup and from the current on demand. 3) When to index the documents. Please guide...

  • Couchdb Problem Near Period Of Low Disk Space in Couchdb-user

  • Hi guys, Apologies if this has been posted already but I couldn't find any related topics in the archives. I saw what looked like a crash in my couchdb server the other day - the relevant log section is included below. I'm running couch version 1.2.0 on an Amazon EC2 instance running Ubuntu 12.04.1. It took about a day for this issue to get noticed and during that time the server basically ...

  • View Group Indexer Has Finishing Status For Long Period Of Time in Couchdb-user

  • Hello All! Can somebody answer why View Group Indexer could have Finishing Status for many minutes. Is it normal or not, what is the possible reason. Thanks...

  • _all_docs Vs Regular View in Couchdb-user

  • is the All docs a special view?...it never has to be primed like traditional views. why is that?...if a use a list function to fold over a certain number of keys during a period of a lot of writes does this view stay up to date ? or does it behave like a regular view?...

  • Queue Response Time Getting Degraded Over A Period Of Time in Activemq-users

  • Hello Friends, Are there any issues already know about queue performance(response time) getting degraded along with number of messages it already processed? In my testing environment we observed that first 5000 messages (synchronous) are getting processed quickly but next 5000 messages are getting processed almost 10 times slower. Regards, Cordys Engineer. -- View this message in context: http...

  • Dates Between A Certain Period Of Time in Mysql-general

  • Hi I need to get dates in a certain period of time. For example I have 2 dates.: 2000-12-12 AND 2000-12-31. How could I get all the dates between those two dates? Thanks S.E...

  • Crawling After A Period Of Time in Nutch-user

  • hi all, I wanted to know how to assign a period of 'recrawl time' to sites. for example I want to crawl every day a specific site and every week another. another thing is... how nutch decides to recrawl a site? thanks. ciao, Marco...

  • Zip Files Are Not Getting Created After A Certain Period Of Time. in Camel-users

  • Hi, I am using a Zip file Data format component to generate single entry zip file after reading messages from RabbitMQ and these are getting generated successfully. I am facing a frequent issue of not producing these zip files after a period of two-three days. I have more than 10 lac message in my queue and these messages are immediately acknowledged to RabbitMQ without processing them ...

  • Network Goes Down After A Period Of Time in Ubuntu-users

  • This only started occurring after I upgraded from Ubuntu 9.04. I used to be able to leave my computer on for days, without a problem. After upgrading to 9.10, I wasn't able to use my samba shares, or ssh. I could still connect to the internet, and browse the web without a problem. I then read a few forums which hinted that I should install resolvconf, and bind9. I installed those and now...

  • Still Floundering, OCIPLogon Still Dying After A Period Of Time.. in Php-windows

  • . I'm still at an impasse with OCIPLogon. I keep losing my Oracle Connection after an unknown period of inactivity (est. 1/2 hour to an hour). Are there any Oracle DBAs who might know of a reason that the connection is being dropped? Someone thinks it might be an optional parameter in the init.ora file... John Asendorf - [email protected] Web Applications Developer http://www...

  • Hbernate Fails After Long Period Of Time in Ubuntu-users

  • Not sure as to what has caused that (is anyone else?), I also tested the hibernate function by changing the splash to "nosplash" and adding a line for the swap on /boot/grub/menu.lst. Although at first I thought this worked correctly, I decided top leave the laptop on hibernate over nigt too see if ubuntu would boot into what I had running previously. Ubuntu failed to load up my settings and even...

  • BackgroundFlushing.average_ms in Mongodb-user

  • Hi, Is backgroundFlushing.average_ms in db.serverStatus() an average over server uptime?  If not, what time period is it an average over? Thanks, James...

  • Querying Count Of First-time/Repeat Events Over Time Period in Mysql-general

  • I have a table structured as follows in mysql 3.23.11: create table events ( event_seq int auto_increment primary key, event_date datetime, visitor int, etc ..... Each new visitor gets assigned a unique identifier. When they come back that visitor id is logged so that I can track first-time vs. repeat visitors. For a given time range, I would like to know: 1. how many visitors are...

  • ANN: Time Period Library Period-0.5 Released in Python

  • The fifth public release of the period library is available at http://www.biostat.wisc.edu/~annis/creations/period.py.html . The library is designed to allow one to specify both unique and recurring time periods symbolically. For example, if you have some program which should only run on Sunday evenings (say, web-log rotations), you can specify that in your program: from period import in_period...

  • Tomcat Pauses Then Crashes After A Period Of Time in Tomcat-users

  • Hi everyone, I have set up tomcat to run as a daemon using jsvc, which is working well, except when tomcat is idle for a period of time (usually overnight), and I execute a web service client, tomcat receives the request then simply stops. I can then restart and use it as normal. The log messages say it is pausing, but then nothing else is reported, eg: Dec 8, 2006 4:21:03 PM org.apache.catalina....

  • Web App Context Stops Responding After A Period Of Time in Tomcat-users

  • HI I am using Jboss 4.01 which has tomcat 5 embedded within it. I have a separate web app context, which serves static PDF/HTML files. The configuration setting for these are in the server.xml and are : This server the static pages fine, however after a period of time/ or number of requests the web site for this context the tomcat just seems to hang. I can still use other web app contexts perfectly...

  • GCM CCS Connection Issue After A Lomg Period Of Time in Android-gcm

  • I have written program to connect to Google ccs server( https://developer.android.com/google/gcm/ccs.html). The gist is available at https://gist.github.com/mseshachalam/06e685dae963c172519d According to google documentation the connection needs to be closed after a period of time which is communicated through a message type called "control". I am running this as a supervisor process and...

  • ActiveMQ 5.10 CPU Spikes To 90-100% And Stays There After A Period Of Time in Activemq-users

  • For reasons that I cannot figure out the ActiveMQ broker will spike its CPU to 90-100% and stay there. I can kill the broker and restart the process (consumers will then reconnect) and it works fine again with low CPU utilization (0-1%). How can I troubleshoot this? There are hundreds of consumers and thousands of topics. I wish there was some easy way for me to know what consumer or topic...

  • Keeping A Connection Open For A Long Period Of Time Starts To Decrease Throughput in Mongodb-user

  • We've noticed that if you keep a connection open for a long period of time (primarily from a back-end system as opposed to a front-end system) that the time it takes for a query gradually gets slower and slower. Starts out at 5ms/query short time later (~5 minutes) >40ms/query one hour - >100ms/query.  Query time never appears to get above 140ms after several hours.  If we stop the connection...

  • Difference Between Concurrent Load Of 100 Users And Active Users For A Given Time Period in Jmeter-user

  • Dear All, What is the Difference between JM 'concurrent users' load of 100 and 'Active users' 100 testing for a given time period. Thanks. Sam...

  • Does Leader Election Have A "Settling" Period? in Zookeeper-user

  • I'm doing some testing around a Client being connected to a zookeeper endpoint that goes away and I'm seeing what appears to be a "settling" period that is causing some errors. The test is as follows: 1) Three zookeeper servers are started up on the same host, configured to cluster with each other. 2) A Client is created and attaches to Server 1 (using deterministic_conn_order flag to force this...

  • Tomcat Fails To Service Requests After Period Of Time in Tomcat-users

  • Hi I am using tomcat 5. WE have a web server(IIS) and use jk2 as the connection to the backend server(jboss 4,01). I have a web app mapped to a network drive to serve static pdf and html files. This uses tomcat because of authentication purposes(one of these reasons is users can be ip authenticated which cannot be done dynamically within IIS). This is a snippet of the server.xml file ...