couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: getting list of items spanning a time period
Date Mon, 01 Apr 2013 09:48:24 GMT
I'm not sure it's possible in a couchdb view, at least not a single
call or view. The best I can think of a view keyed on admission_time
and another on discharge_time. You'd have to do the set subtraction
yourself, though. couchdb-lucene obviously does this for you. I assume
you're doing boolean queries using admission_time and discharge_time


On 1 April 2013 10:38, Александр Опак <> wrote:
> Use 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

View raw message