Compares the local productIds with the remote and collects the ids which are no longer existing remotely. These are then returned to be deleted.
a list of VaccineInfoJSON objects to insert into the vaccine data table.
the productIds which exist locally and no longer remotely
Compares the filenames of external and intneral PDFs to check for file changes/updates
a promise containaing a list of data relating to externa, pdfs. This consists of the filenames of the external files as well as the local name comparisons
This will take the provided ids and download the related pdf from the saskatchewn publications api
the Id of the vaccine being updated, used to build the path, cannot be zero, must exist in the database
the format id, this refers to the id of the english or french PDF, used to build the path cannot be 0
a promise containing a string, this string is the path to the pdf within the mobile device
Retrieves the names of the local PDFs of both the english and french versions
the vaccine to check, a number greater than 0 and existing in the database
an promise containing an object with the english and french PDF names, both in the form of strings
Gets all of the SHA vaccine JSON ids as well as the ids for the language specific formats.
a list of all vaccine product ids and format ids.
Gets the entire JSON sheet for each product ID from the Government of Saskatchewan publications api
A list of responses in the form of the JSON received. It is much too large to warrant its own type
!! This is going to be removed, it is not needed and cannot test reliably !!
Retrieves the remote vaccine list hosted as a JSON file
a promise containing the updated vaccine list
Gets the local version of the Vaccine List. This version number is obtained from the vaccine list JSON endpoint and store in async storage
If the version number is not present in storage a -1 is returned to ensure that it is always less than the new version
A promise containing the version number. It is type casted as AsyncStorage can only store strings
Gets the remote version of the Vaccine List. This version number is obtained from the vaccine list JSON endpoint and store in async storage
If the version number is not present in storage a -1 is returned to ensure that it is always less than the new version
A promise containing the version number.
Gets a list of VaccineSheet object which contain the local vaccine information PDFs and other related info. Retrieves it in either english or french
must be english
or french
, this is required
A promise containing a list of VaccineSheet
objects
Stores the remote vaccine list locally, returns a promise
a list of VaccineInfoJSON objects to insert into the vaccine data table. This will also update and existing row if a row with the productId already exists.
a void promise
Stores the version of the Vaccine List. This version number is obtained from the vaccine list JSON endpoint
a string representing the version number to set
Takes in a product id and potentially an english and french filename. Filenames that exist are updated in the row linked to the product Id
the id of the row to update, a vaccine entry This must be a positive number which already exists in the table.
Optional
englishFilename: stringthe new name of the remote vaccine pdf in english This must be a string.
Optional
frenchFilename: stringthe new name of the remote vaccine pdf in french This must be a string.
Optional
englishFormatId: numberOptional
frenchFormatId: numberA void promise.
Builds and runs a query against the vaccine data table returning the filtered rows
if a default language is not provided it will use english
Optional
input: stringif not given it will return all results,
Optional
searchColumn: stringsearch by a specific column
Optional
order: {if not given the default orfer will be given
Implements
iVaccineService
, is used to apply logic to external APIs and internal databases/filestorage