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

filter fix

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