@tmccormi @Leo24 for Appointment status, can you return and update status through list_options table? We have a new requirement for a new mapping. So when you get an appointment status through FHIR, look at the status, compare with list_options table mapping column, and then store the appropriate option_id in the libreehr_calendar table. Conversely, when you send appointment data out through FHIR API, can you look at appointment status (which will be a symbol like @ or ~) look up appointment in list_options table, and return the value from the mapping column instead of option_id column?
To get appointment status SQL to provide to FHIR:
SELECT mapping FROM list_options WHERE list_id = 'apptstat' AND option_id ='@';
// Then return the mapping instead of the value stored in LibreEHR appointment table
To set appointment status SQL to receive from FHIR:
SELECT option_id FROM list_options WHERE list_id = 'apptstat' AND mapping ='available';
// Then set the option_id instead of the mapping inside LibreEHR appointment table
@tmccormi @Leo24 for Appointment status, can you return and update status through list_options table? We have a new requirement for a new mapping. So when you get an appointment status through FHIR, look at the status, compare with list_options table mapping column, and then store the appropriate option_id in the libreehr_calendar table. Conversely, when you send appointment data out through FHIR API, can you look at appointment status (which will be a symbol like @ or ~) look up appointment in list_options table, and return the value from the mapping column instead of option_id column?
To get appointment status SQL to provide to FHIR: SELECT mapping FROM list_options WHERE list_id = 'apptstat' AND option_id ='@'; // Then return the mapping instead of the value stored in LibreEHR appointment table
To set appointment status SQL to receive from FHIR: SELECT option_id FROM list_options WHERE list_id = 'apptstat' AND mapping ='available'; // Then set the option_id instead of the mapping inside LibreEHR appointment table