Hello, my project is on the community plan and therefore does not have
access to the lookup table function. I need to allocate/link facility IDs
to facility names (grouped under 6 sub-county variable names), and wondered
if there is a neater / cleaner way to do than I have done it below. We have
6 different sub-counties, so the following codes are just for 1 sub-county
(the variable name hf_name_central_kabuchai is the sub-county) - I would
need to repeat these codes 5 times for the facilities in the other 5
sub-counties, and then concatenate them to get them in one column (since
using the method below, and then repeating for each sub county means that
the facility codes end up in 6 columns).
2nd subcounty:
if(data/hf_name_east_webuye_e="Sinoko_Dipsensary", 14563, if( etc. etc.
I have looked through the commcare functions and logic help page, but can't
seem to find if there is a simpler cleaner way of doing this (aside from
using a lookup table) - can anyone suggest anything?
If you're choosing the subcounty in a choice question, you could set the
item value of each choice to be the code or number for each subcounty.
Thanks,
Sheel
···
On Tue, Mar 8, 2016 at 6:33 AM, 'sarah' via commcare-users < commcare-users@googlegroups.com> wrote:
Hello, my project is on the community plan and therefore does not have
access to the lookup table function. I need to allocate/link facility IDs
to facility names (grouped under 6 sub-county variable names), and wondered
if there is a neater / cleaner way to do than I have done it below. We have
6 different sub-counties, so the following codes are just for 1 sub-county
(the variable name hf_name_central_kabuchai is the sub-county) - I would
need to repeat these codes 5 times for the facilities in the other 5
sub-counties, and then concatenate them to get them in one column (since
using the method below, and then repeating for each sub county means that
the facility codes end up in 6 columns).
2nd subcounty:
if(data/hf_name_east_webuye_e="Sinoko_Dipsensary", 14563, if( etc. etc.
I have looked through the commcare functions and logic help page, but
can't seem to find if there is a simpler cleaner way of doing this (aside
from using a lookup table) - can anyone suggest anything?
Hi Sheel, thanks a lot for your suggestion. Unfortunately the codes differ
for each facility within a single sub-county, but also I need to show the
subcounty name as well as facility name I had thought of adding the
code on to the end of the facility name in the item value, and then dealing
with separating it out in excel, but that's also a bit long winded.
Thanks,
Sarah
···
On Tuesday, 8 March 2016 15:43:06 UTC, Sheel Shah wrote:
>
> Hi Sarah,
>
> If you're choosing the subcounty in a choice question, you could set the
> item value of each choice to be the code or number for each subcounty.
>
> Thanks,
> Sheel
>
> On Tue, Mar 8, 2016 at 6:33 AM, 'sarah' via commcare-users < commcar...@googlegroups.com > wrote:
>
>> Hello, my project is on the community plan and therefore does not have
>> access to the lookup table function. I need to allocate/link facility IDs
>> to facility names (grouped under 6 sub-county variable names), and wondered
>> if there is a neater / cleaner way to do than I have done it below. We have
>> 6 different sub-counties, so the following codes are just for 1 sub-county
>> (the variable name hf_name_central_kabuchai is the sub-county) - I would
>> need to repeat these codes 5 times for the facilities in the other 5
>> sub-counties, and then concatenate them to get them in one column (since
>> using the method below, and then repeating for each sub county means that
>> the facility codes end up in 6 columns).
>>
>> 1st sub-county:
>> if(/data/hf_name_central_kabuchai="Chwele_Sub_District_Hospital",15860,
>> if(/data/hf_name_central_kabuchai="Kabuchai_Health_Centre", 15911,
>> if(/data/hf_name_central_kabuchai="Kimalewa_Health_Centre", 15948,
>> if(/data/hf_name_central_kabuchai="Nalondo_Health_Centre", 17117,
>> if(/data/hf_name_central_kabuchai="Lukhome_Dispensary_Bungoma_West", 15966,
>> if(/data/hf_name_central_kabuchai="Luuya_Dispensary", 17116, 16125))))))
>>
>> 2nd subcounty:
>> if(data/hf_name_east_webuye_e="Sinoko_Dipsensary", 14563, if( etc. etc.
>>
>> I have looked through the commcare functions and logic help page, but
>> can't seem to find if there is a simpler cleaner way of doing this (aside
>> from using a lookup table) - can anyone suggest anything?
>>
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "commcare-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to commcare-user...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sheel Shah
> Project Manager | Dimagi
> m: +1.781.428.5419 | skype: sheel_shah
>
>
>
Could you embed the information in the user group custom data mapping?
There is a special commcare-user case for every mobile worker too if you
wanted to associate it by user.
I bet there is a crazy way to save the facility names and ids in a
translation string and extract it.
···
On Tuesday, March 8, 2016 at 11:19:05 AM UTC-5, sarah wrote:
>
> Hi Sheel, thanks a lot for your suggestion. Unfortunately the codes differ
> for each facility within a single sub-county, but also I need to show the
> subcounty name as well as facility name :-( I had thought of adding the
> code on to the end of the facility name in the item value, and then dealing
> with separating it out in excel, but that's also a bit long winded.
>
> Thanks,
> Sarah
>
> On Tuesday, 8 March 2016 15:43:06 UTC, Sheel Shah wrote:
>>
>> Hi Sarah,
>>
>> If you're choosing the subcounty in a choice question, you could set the
>> item value of each choice to be the code or number for each subcounty.
>>
>> Thanks,
>> Sheel
>>
>> On Tue, Mar 8, 2016 at 6:33 AM, 'sarah' via commcare-users < commcar...@googlegroups.com> wrote:
>>
>>> Hello, my project is on the community plan and therefore does not have
>>> access to the lookup table function. I need to allocate/link facility IDs
>>> to facility names (grouped under 6 sub-county variable names), and wondered
>>> if there is a neater / cleaner way to do than I have done it below. We have
>>> 6 different sub-counties, so the following codes are just for 1 sub-county
>>> (the variable name hf_name_central_kabuchai is the sub-county) - I would
>>> need to repeat these codes 5 times for the facilities in the other 5
>>> sub-counties, and then concatenate them to get them in one column (since
>>> using the method below, and then repeating for each sub county means that
>>> the facility codes end up in 6 columns).
>>>
>>> 1st sub-county:
>>> if(/data/hf_name_central_kabuchai="Chwele_Sub_District_Hospital",15860,
>>> if(/data/hf_name_central_kabuchai="Kabuchai_Health_Centre", 15911,
>>> if(/data/hf_name_central_kabuchai="Kimalewa_Health_Centre", 15948,
>>> if(/data/hf_name_central_kabuchai="Nalondo_Health_Centre", 17117,
>>> if(/data/hf_name_central_kabuchai="Lukhome_Dispensary_Bungoma_West", 15966,
>>> if(/data/hf_name_central_kabuchai="Luuya_Dispensary", 17116, 16125))))))
>>>
>>> 2nd subcounty:
>>> if(data/hf_name_east_webuye_e="Sinoko_Dipsensary", 14563, if( etc. etc.
>>>
>>> I have looked through the commcare functions and logic help page, but
>>> can't seem to find if there is a simpler cleaner way of doing this (aside
>>> from using a lookup table) - can anyone suggest anything?
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "commcare-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to commcare-user...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Sheel Shah
>> Project Manager | Dimagi
>> m: +1.781.428.5419 | skype: sheel_shah
>>
>>
>>