Commit 4f49a811 authored by Dave Griffiths's avatar Dave Griffiths

filter fix

parent 4c3de7b9
......@@ -457,7 +457,7 @@
(list
(network-connect
"network"
"mongoose-web"
"symbai-web"
(lambda (state)
(debug! (string-append "Raspberry Pi connection state now: " state))
(append
......@@ -1031,7 +1031,7 @@
(define (build-test! db table village-ktvlist household-ktvlist individual-ktvlist)
(looper!
3
1
(lambda (i)
(msg "making village" i)
(let ((village (simpsons-village db table village-ktvlist)))
......@@ -1042,7 +1042,7 @@
(msg "making household" i)
(let ((household (simpsons-household db table village household-ktvlist)))
(looper!
(+ 5 (random 10))
(+ 2 (random 5))
(lambda (i)
(msg "making individual" i)
(simpsons-individual db table household individual-ktvlist))))))))))
......
......@@ -502,12 +502,14 @@
(define (update-individual-filter-inner households)
(set! filter-households households)
(set! filter-index 0)
(delayed "filter-delayed" 100 gradual-build))
(define (update-individual-filter)
(let ((households (db-filter-only db "sync" "household"
(list (list "parent" "varchar" "=" (get-setting-value "current-village")))
(list (list "name" "varchar")))))
(msg "UIF" households)
(update-individual-filter-inner households)))
......
"test-num",1,1,1," "
"test-text"," I am test text"," I am test text"," I am test text"," "
"one","one"," ",,
"two","two"," ",,
"three"," three"," ",,
"next","Next",,,
"details-next", "Next",,
"family-next", "Next",,
"migration-next", "Next",,
"income-next", "Next",,
"gene-next", "Next",,
"social-next", "Next",,
"friendship-next", "Next",,
"agreement-next", "Next",,
"village"," Village"," ",,
"household"," Household"," ",,
"households"," Households"," ",,
"individual"," Individual"," ",,
"individuals"," Individuals"," ",,
"add-item-to-list",0," ",,
"default-village-name"," New village"," ",,
"title"," Symbai"," Symbai"," Symbai"," "
"sync"," Sync"," Sync"," Sync"," "
"languages"," Choose language"," Choose language"," Choose language"," "
"english"," English"," English"," English"," "
"khasi"," Khasi"," Khasi"," Khasi"," "
"hindi"," Hindi"," Hindi"," Hindi"," "
"user-id"," User ID"," User ID"," User ID"," "
"save"," Save"," Save"," Save"," "
"back"," Back"," Back"," Back"," "
"off"," Off"," Off"," Off"," "
"villages"," Villages"," Villages"," Villages"," "
"list-empty"," List empty"," ",,
"delete"," Delete"," ",,
"delete-are-you-sure"," Are you sure you want to delete this?"," ",,
"save-are-you-sure"," Are you sure you want to save changes?"," ",,
"quick-name"," New person name"," ",,
"quick-add"," Quick add"," ",,
"find-individual"," Find individual"," ",,
"filter"," Filter"," ",,
"off"," Off"," Off"," Off"," "
"name"," Name","Kyrteng",,
"sync-all"," Sync me!"," ",,
"sync-syncall"," Sync everything"," ",,
"export-data"," Exporting data"," ",,
"sync-download"," Download main DB"," ",,
"sync-export"," Email main DB"," ",,
"email-local"," Email local DB"," ",,
"debug"," Debug"," ",,
"sync-back"," Back"," ",,
"sync-prof"," Profile"," ",,
"village-name"," Village name"," Village name"," Village name"," "
"block"," Block"," Block"," Block"," "
"district"," District"," District"," District"," "
"car"," Accessible by car"," ",,
"household-list"," Household list"," ",,
"amenities"," Amenities"," ",,
"school"," School"," ",,
"present"," Present"," ",,
"closest-access"," Closest place of access"," ",,
"house-gps"," GPS"," ",,
"toilet-gps"," GPS"," ",,
"school-in-village","In Village",,,
"school"," School"," ",,
"school-closest-access"," Closest access"," ",,
"school-gps"," GPS"," ",,
"hospital-in-village","In Village",,,
"hospital"," Hospital/Health care centre"," ",,
"hospital-closest-access"," Closest access"," ",,
"hospital-gps"," GPS"," ",,
"Post-office-in-village","In Village",,,
"post-office"," Post Office"," ",,
"post-office-closest-access"," Closest access"," ",,
"post-office-gps"," GPS"," ",,
"railway-station-in-village","In Village",,,
"railway-station"," Railway station"," ",,
"railway-station-closest-access"," Closest access"," ",,
"railway-station-gps"," GPS"," ",,
"State-bus-service-in-village","In Village",,,
"state-bus-service"," Inter-state bus service"," ",,
"state-bus-service-closest-access"," Closest access"," ",,
"state-bus-service-gps"," GPS"," ",,
"District-bus-service-in-village","In Village",,,
"district-bus-service"," Inter-village/district bus service"," ",,
"district-bus-service-closest-access"," Closest access"," ",,
"district-bus-service-gps"," GPS"," ",,
"Panchayat-in-village","In Village",,,
"panchayat"," Village Panchayat Office"," ",,
"panchayat-closest-access"," Closest access"," ",,
"panchayat-gps"," GPS"," ",,
"NGO-in-village","In Village",,,
"NGO"," Presence of NGO's working with them"," ",,
"NGO-closest-access"," Closest access"," ",,
"NGO-gps"," GPS"," ",,
"market-in-village","In Village",,,
"market"," Market"," ",,
"market-closest-access"," Closest access"," ",,
"market-gps"," GPS"," ",,
"household-name"," Household name"," ",,
"default-household-name"," A household"," ",,
"location"," House location"," ",,
"elevation"," Elevation"," ",,
"toilet-location"," Toilet location"," ",,
"children"," Children"," ",,
"male"," Male","Shynrang",,
"female"," Female","Kynthei",,
"num-pots"," Number of pots"," ",,
"adults"," Adults"," ",,
"add-individual"," Add individual"," ",,
"default-individual-name"," A person"," ",,
"default-family-name"," A family"," ",,
"default-photo-id"," ???"," ",,
"name-display"," Name","Kyrteng",,
"photo-id-display"," Photo ID","Nombor dur ID",,
"family-display"," Family","Family/Clan",,
"details-button"," Details"," ",,
"family-button"," Family","Family/Clan",,
"migration-button"," Migration"," ",,
"friendship-button","Friendship",,,
"income-button"," Income"," ",,
"geneaology-button"," Geneaology"," ",,
"social-button"," Social"," ",,
"agreement-button"," Agreement"," ",,
"is-a-child"," Child"," ",,
"change-photo"," Change photo"," ",,
"details-name"," Name","Kyrteng",,
"details-first-name","Name","Kyrteng",,
"details-photo-id"," Photo ID","Nombor dur ID",,
"details-family"," Family"," ",,
"tribe"," Tribe","Jaidbynriew:",,
"sub-tribe"," Sub tribe","Tynrai Jaidbynriew",,
"khasi"," Khasi"," ",,
"khynriam"," Khynriam"," ",,
"pnar"," Pnar"," ",,
"bhoi"," Bhoi"," ",,
"war"," War"," ",,
"other"," Other"," ",,
"age"," Age","Ka rta",,
"gender"," Gender","U/ka",,
"education"," Education","Jingpule",,
"illiterate"," Illiterate","Bym Nang/Bymstad",,
"literate"," Literate","Lah Nang/Lahtip",,
"primary"," Primary 1-5","Biang 1-5",,
"middle"," Middle 6-8","Ba Pdeng 6-8",,
"high"," High 9-10","Lah Khamstad 9-10",,
"secondary"," Higher Secondary","Lah stad",,
"university"," University","La pyndep university",,
"spouse"," Spouse"," ",,
"change-id"," Change"," ",,
"head-of-house"," Head of house"," ",,
"marital-status"," Marital status"," ",,
"ever-married"," Ever married"," ",,
"currently-married"," Currently married"," ",,
"currently-single"," Currently single"," ",,
"seperated"," Seperated/divorced"," ",,
"times-married"," How many times married"," ",,
"change-spouse"," Change/add spouse"," ",,
"children-living"," Living"," ",,
"children-dead"," Dead"," ",,
"children-together"," Living together"," ",,
"children-apart"," Living apart"," ",,
"residence-after-marriage"," Residence after marriage"," ",,
"birthplace"," Birthplace"," ",,
"spouse-village"," Spouses natal village"," ",,
"num-siblings"," Number of living siblings of the same sex born from same mother"," ",,
"birth-order"," Birth order amoung currently living same sex siblings born from same mother"," ",,
"length-time"," Length of time lived in this village (years)"," ",,
"place-of-birth"," Place of birth"," ",,
"num-residence-changes"," Number of time place of residence changed since birth"," ",,
"village-visits-month"," Number of times you have visited another village in the last month"," ",,
"village-visits-year"," Number of times you have visited another village in the last year (i.e. between last summer and this summer)"," ",,
"occupation"," Occupation"," ",,
"occupation"," Occupation"," ",,
"num-people-in-house"," People living in house"," ",,
"contribute"," Do you contribute to the family earnings?"," ",,
"own-land"," Do you own land?"," ",,
"rent-land"," Do you rent out your land?"," ",,
"hire-land"," Do you hire someone else's land to work on?"," ",,
"crops-detail","List the crops you grew last year:",,,
"crops"," Crops"," ",,
"unit"," Unit"," ",,
"quantity"," Quantity"," ",,
"used-or-eaten"," Used/Eaten"," ",,
"sold"," Sold"," ",,
"seed"," Seed (hybrid/local)"," ",,
"house-type"," Type of house"," ",,
"concrete"," Concrete"," ",,
"tin"," Tin"," ",,
"thatched"," Thatched"," ",,
"loan"," Outstanding loans"," ",,
"earning"," How much do you earn for one day's labour?"," ",,
"in-the-home"," In the home"," ",,
"radio"," Radio"," ",,
"tv"," TV"," ",,
"mobile"," Mobile phone"," ",,
"visit-market"," How many times do you visit the tribal market?"," ",,
"town-sell","How many times a month do you visit your nearest city or town to buy or sell something?"," ",,
"default-crop-name"," A crop"," ",,
"crop-name"," Crop name"," ",,
"crop-unit"," Crop unit"," ",,
"crop-used"," Used or eaten"," ",,
"crop-sold"," Sold"," ",,
"crop-seed"," Seed"," ",,
"mother"," Mother"," ",,
"father"," Father"," ",,
"change-mother"," Change mother"," ",,
"change-father"," Change father"," ",,
"alive"," Alive"," ",,
"sex"," Sex"," ",,
"social-type"," Type"," ",,
"friendship"," Friendship"," ",,
"knowledge"," Knowledge"," ",,
"prestige"," Prestige"," ",,
"social-one"," One"," ",,
"social-two"," Two"," ",,
"social-three"," Three"," ",,
"social-four"," Four"," ",,
"social-five"," Five"," ",,
"social-nickname","Name",,,
"social-relationship"," Relation"," ",,
"social-residence"," Residence"," ",,
"social-strength"," Strength"," ",,
"mother"," Mother"," ",,
"father"," Father"," ",,
"sister"," Sister"," ",,
"brother"," Brother"," ",,
"spouse"," Spouse"," ",,
"children"," Children"," ",,
"co-wife"," Co-wife"," ",,
"spouse-mother"," Spouse's mother"," ",,
"spouse-father"," Spouse's father"," ",,
"spouse-brother-wife"," Spouse's brother's wife"," ",,
"spouse-sister-husband"," Spouse's sister's husband"," ",,
"friend"," Friend"," ",,
"neighbour"," Neighbour"," ",,
"same"," Same"," ",,
"daily"," Daily"," ",,
"weekly"," Weekly"," ",,
"monthly"," Monthly"," ",,
"less"," Less"," ",,
"child-name","Name",,,
"child-gender","Gender",,,
"child-age","Age",,,
"child-home","Lives at home",,,
"child-alive","Alive",,,
"default-child-name","A child",,,
"move-button","Move household",,,
"move-household","Pick a new household",,,
"house-id","House ID",,,
"photo-id","Photo ID",,,
"add-are-you-sure","Are you sure you want to add this individual?",,,
"gps-are-you-sure","Are you sure you want to record your current position?",,,
"gps-are-you-sure-2","Please confirm again...",,,
"current-village","Your current village",,,
"num-children","Number of children",,,
"occupation-agriculture","Agriculture",,,
"occupation-gathering","Gathering",,,
"occupation-labour","Labour",,,
"occupation-cows","Cows",,,
"occupation-fishing","Fishing",,,
"occupation-other","Other",,,
"friendship-question","LIST UP TO FIVE PERSONS whom you have really liked to talk to in the last year. They can be of either sex. They can be friends, neighbours, relatives, co-wives; they can live in this village or elsewhere; anyone you like to talk to. ",,,
"prestige-question","LIST UP TO FIVE PERSONS who you think are the most respected in the village: ",,,
"knowledge-question","LIST UP TO FIVE PERSONS who you think are the most knowledgeable in the village:",,,
Code (don't change these) English Khasi Hindi
test-num 1 1 1
test-text I am test text I am test text I am test text
one one
two two
three three
start Symbai
next Next
details-next Next
family-next Next
migration-next Next
income-next Next
gene-next Next
social-next Next
friendship-next Next
agreement-next Next
village Village
household Household
households Households
individual Individual
individuals Individuals
add-item-to-list 0
default-village-name New village
title Symbai Symbai Symbai
sync Sync Sync Sync
languages Choose language Choose language Choose language
english English English English
khasi Khasi Khasi Khasi
hindi Hindi Hindi Hindi
user-id User ID User ID User ID
save Save Save Save
back Back Back Back
off Off Off Off
villages Villages Villages Villages
list-empty List empty
delete Delete
delete-are-you-sure Are you sure you want to delete this?
save-are-you-sure Are you sure you want to save changes?
quick-name New person name
quick-add Quick add
find-individual Find individual
filter Filter
filter-switch Run filter
off Off Off Off
name Name Kyrteng
sync-all Sync me!
sync-syncall Sync everything
export-data Exporting data
sync-download Download main DB
sync-export Email main DB
email-local Email local DB
debug Debug
sync-back Back
sync-prof Profile
village-name Village name Village name Village name
block Block Block Block
district District District District
car Accessible by car
household-list Household list
amenities Amenities
school School
present Present
closest-access Closest place of access
house-gps GPS
toilet-gps GPS
school-in-village In Village
school School
school-closest-access Closest access
school-gps GPS
hospital-in-village In Village
hospital Hospital/Health care centre
hospital-closest-access Closest access
hospital-gps GPS
Post-office-in-village In Village
post-office Post Office
post-office-closest-access Closest access
post-office-gps GPS
railway-station-in-village In Village
railway-station Railway station
railway-station-closest-access Closest access
railway-station-gps GPS
State-bus-service-in-village In Village
state-bus-service Inter-state bus service
state-bus-service-closest-access Closest access
state-bus-service-gps GPS
District-bus-service-in-village In Village
district-bus-service Inter-village/district bus service
district-bus-service-closest-access Closest access
district-bus-service-gps GPS
Panchayat-in-village In Village
panchayat Village Panchayat Office
panchayat-closest-access Closest access
panchayat-gps GPS
NGO-in-village In Village
NGO Presence of NGO's working with them
NGO-closest-access Closest access
NGO-gps GPS
market-in-village In Village
market Market
market-closest-access Closest access
market-gps GPS
household-name Household name
default-household-name A household
location House location
elevation Elevation
toilet-location Toilet location
children Children
male Male Shynrang
female Female Kynthei
num-pots Number of pots
adults Adults
add-individual Add individual
default-individual-name A person
default-family-name A family
default-photo-id ???
name-display Name Kyrteng
photo-id-display Photo ID Nombor dur ID
family-display Family Family/Clan
details-button Details
family-button Family Family/Clan
migration-button Migration
friendship-button Friendship
income-button Income
genealogy-button Genealogy
social-button Social
agreement-button Agreement
is-a-child Child
change-photo Change photo
details-name Name Kyrteng
details-first-name Name Kyrteng
details-photo-id Photo ID Nombor dur ID
details-family Family
tribe Tribe Jaidbynriew:
sub-tribe Sub tribe Tynrai Jaidbynriew
khasi Khasi
khynriam Khynriam
pnar Pnar
bhoi Bhoi
war War
other Other
age Age Ka rta
gender Gender U/ka
education Education Jingpule
illiterate Illiterate Bym Nang/Bymstad
literate Literate Lah Nang/Lahtip
primary Primary 1-5 Biang 1-5
middle Middle 6-8 Ba Pdeng 6-8
high High 9-10 Lah Khamstad 9-10
secondary Higher Secondary Lah stad
university University La pyndep university
spouse Spouse
change-id Change
head-of-house Head of house
marital-status Marital status
ever-married Ever married
currently-married Currently married
currently-single Currently single
seperated Seperated/divorced
times-married How many times married
change-spouse Change/add spouse
children-living Living
children-dead Dead
children-together Living together
children-apart Living apart
residence-after-marriage Residence after marriage
birthplace Birthplace
spouse-village Spouses natal village
num-siblings Number of living siblings of the same sex born from same mother
birth-order Birth order amoung currently living same sex siblings born from same mother
length-time Length of time lived in this village (years)
place-of-birth Place of birth
num-residence-changes Number of time place of residence changed since birth
village-visits-month Number of times you have visited another village in the last month
village-visits-year Number of times you have visited another village in the last year (i.e. between last summer and this summer)
occupation Occupation
occupation Occupation
num-people-in-house People living in house
contribute Do you contribute to the family earnings?
own-land Do you own land?
rent-land Do you rent out your land?
hire-land Do you hire someone else's land to work on?
crops-detail List the crops you grew last year:
crops Crops
unit Unit
quantity Quantity
used-or-eaten Used/Eaten
sold Sold
seed Seed (hybrid/local)
house-type Type of house
concrete Concrete
tin Tin
thatched Thatched
loan Outstanding loans
earning How much do you earn for one day's labour?
in-the-home In the home
radio Radio
tv TV
mobile Mobile phone
visit-market How many times do you visit the tribal market?
town-sell How many times a month do you visit your nearest city or town to buy or sell something?
default-crop-name A crop
crop-name Crop name
crop-unit Crop unit
crop-used Used or eaten
crop-sold Sold
crop-seed Seed
mother Mother
father Father
change-mother Change mother
change-father Change father
alive Alive
sex Sex
social-type Type
friendship Friendship
knowledge Knowledge
prestige Prestige
social-one One
social-two Two
social-three Three
social-four Four
social-five Five
social-nickname Name
social-relationship Relation
social-residence Residence
social-strength Strength
mother Mother
father Father
sister Sister
brother Brother
spouse Spouse
children Children
co-wife Co-wife
spouse-mother Spouse's mother
spouse-father Spouse's father
spouse-brother-wife Spouse's brother's wife
spouse-sister-husband Spouse's sister's husband
friend Friend
neighbour Neighbour
same Same
daily Daily
weekly Weekly
monthly Monthly
less Less
child-name Name
child-gender Gender
child-age Age
child-home Lives at home
child-alive Alive
default-child-name A child
move-button Move household
move-household Pick a new household
house-id House ID
photo-id Photo ID
add-are-you-sure Are you sure you want to add this individual?
gps-are-you-sure Are you sure you want to record your current position?
gps-are-you-sure-2 Please confirm again...
current-village Your current village
num-children Number of children
occupation-agriculture Agriculture
occupation-gathering Gathering
occupation-labour Labour
occupation-cows Cows
occupation-fishing Fishing
occupation-other Other
friendship-question LIST UP TO FIVE PERSONS whom you have really liked to talk to in the last year. They can be of either sex. They can be friends, neighbours, relatives, co-wives; they can live in this village or elsewhere; anyone you like to talk to.
prestige-question "LIST UP TO FIVE PERSONS who you think are the most respected in the village: "
knowledge-question LIST UP TO FIVE PERSONS who you think are the most knowledgeable in the village:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment