Make satellite clinic details accessible in eForms

Share this

OSCAR supports multisite/multi location clinics, where each can have its own clinic name/address/phone/fax, and doctors can be assigned to multiple locations to choose which details show up on each Rx, have different schedule templates assigned to each location, etc.

By default all OSCAR versions that have the clinic tag provide only one clinic name and details (the first one entered.) You can capture the entire list with some of the following tags in both OSCAR 19 and Open OSP (apconfig.xml). For WELL you will need to hard code the particulars

From Peter Hutten-Czapski:

The method you have to use for WELL may be easier for any version if the list of sites will remain static over time.
To whit Provide all the Details and have an Xbox to indicate which are the correct details for this particular one that will persist on saving
(if no room for all have the Xbox control the javascript that populates the eform and make it non printable class)

<databaseap>
   <ap-name>clinic_multi_phone</ap-name>
   <ap-sql>SELECT clinic_delim_phone AS clinic_multi_phone FROM clinic</ap-sql>
   <ap-output>${clinic_multi_phone}</ap-output>
</databaseap>
<databaseap>
   <ap-name>clinic_multi_fax</ap-name>
   <ap-sql>SELECT clinic_delim_fax AS clinic_multi_fax FROM clinic</ap-sql>
   <ap-output>${clinic_multi_fax}</ap-output>
</databaseap>
<!-- Multisite Information -->
<databaseap>
   <ap-name>multisite_name_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(REPLACE(name,';','') SEPARATOR ';') AS

            name_list FROM site WHERE status=1 ORDER BY site_id;</ap-sql>
   <ap-output>${name_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_fax_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(REPLACE(fax,';','') SEPARATOR ';') AS

            fax_list FROM site WHERE status=1 ORDER BY site_id;</ap-sql>
   <ap-output>${fax_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_phone_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(REPLACE(phone,';','') SEPARATOR ';') AS

            phone_list FROM site WHERE status=1 ORDER BY site_id;</ap-sql>
   <ap-output>${phone_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_full_address_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(

            REPLACE(address,';',''), ' ',

            REPLACE(city,';',''), ' ',

            REPLACE(province,';',''), ' ',

            REPLACE(postal,';','')

            SEPARATOR ';') AS address_list

            FROM site

            WHERE status=1

            ORDER BY site_id;</ap-sql>
   <ap-output>${address_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_address_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(

            REPLACE(address,';','')

            SEPARATOR ';') AS address_list

            FROM site

            WHERE status=1

            ORDER BY site_id;</ap-sql>
   <ap-output>${address_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_city_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(

            REPLACE(city,';','')

            SEPARATOR ';') AS city_list

            FROM site

            WHERE status=1

            ORDER BY site_id;</ap-sql>
   <ap-output>${city_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_province_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(

            REPLACE(province,';','')

            SEPARATOR ';') AS province_list

            FROM site

            WHERE status=1

            ORDER BY site_id;</ap-sql>
   <ap-output>${province_list}</ap-output>
</databaseap>
<databaseap>
   <ap-name>multisite_postal_list</ap-name>
   <ap-sql>SELECT GROUP_CONCAT(

            REPLACE(postal,';','')

            SEPARATOR ';') AS postal_list

            FROM site

            WHERE status=1

            ORDER BY site_id;</ap-sql>
   <ap-output>${postal_list}</ap-output>
</databaseap>