Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
integration:coms [2026/09/25 15:43] – [Setup] Gary Willettsintegration:coms [2026/09/30 10:19] (current) – [Pick lists] Gary Willetts
Line 46: Line 46:
  
 **COMS site Code/Description and Store code table** **COMS site Code/Description and Store code table**
-This table contains the mapping between the Site code used by COMS and the Store code used by mSupply. If a store has a secondary store (e.g. a main store and a secondary malaria store) that should be treated as a single store when sending inventory files and receiving shipments, the secondary store can also be selected.+This table contains the mapping between the Site code used by COMS and the Store code used by mSupply. If a store has a secondary store (e.g. a main store and a secondary malaria store) that should be treated as a single store when sending inventory files and receiving shipments, the secondary store can also be selected. For each mapping you can also choose which programs belong to the main and which belong to the secondary store so that shipments for different programs can be directed to their correct store. **NOTE:** A program in the context of the COMS interface is a //customer type transaction category// which //has a code// (customer transaction categories without a code are not considered as COMS programs).
  
 To edit a mapping double click on it in the table, to add or remove mappings click on the //+// and //-// buttons respectively. To edit a mapping double click on it in the table, to add or remove mappings click on the //+// and //-// buttons respectively.
- 
-<WRAP info center round 90%> 
-Note that mSupply will process all lines in a shipment file. Just as we were going live, another requirement was passed to us to only process shipment file lines that had 'confirmed' status. It requires big changes to make that work so Chemonics wrote a script that takes the files deposited by One in Axios' outbox folder and puts only those that we should process in another folder. mSupply then checks this folder for shipment files to process. At some point we might be asked to incorporate these changes into mSupply. 
-</WRAP> 
  
  
Line 59: Line 55:
 These files are retrieved from the remote SFTP server according to the schedule. A single file can contain multiple shipments but the rows for a shipment will always be grouped together. Depending on the identity of the source and destination store, a single shipment will either be turned into a supplier invoice (to receive stock) or a stock transfer customer invoice (to send stock to another store). These files are retrieved from the remote SFTP server according to the schedule. A single file can contain multiple shipments but the rows for a shipment will always be grouped together. Depending on the identity of the source and destination store, a single shipment will either be turned into a supplier invoice (to receive stock) or a stock transfer customer invoice (to send stock to another store).
  
-If the program of a shipment is "global-fund::malaria", "global-fund::malaria-iccm" or "global-fund::malaria-idp" (these are transaction category //codes// in mSupply) then the transaction is for the malaria store attached to the corresponding main store (the relationships between main stores and their corresponding malaria stores are stored in the preferences as described above).+Shipments are created as customer invoices with placeholder lines. They are created in the correct store by matching the supplier code and program of a shipment in the shipment file to the entries made in the **COMS site Code/Description and Store code table** table in the settings (see the [[coms#setup|Setup]] section above).
  
-The shipment ID is stored in the **Their ref** field of each invoice created.+The shipment ID is stored in the **Their ref** field of each customer invoice created.
  
 Before being processed, the shipment number of each shipment file is checked against the shipment number stored in the Their ref field of all other customer invoices in all the stores defined in the **One site Code/Description and Store code table** (described in the preferences above). If the shipment number isn't found in any of these customer invoices then processing can continue as normal. If the shipment number is found the shipment is not processed: Before being processed, the shipment number of each shipment file is checked against the shipment number stored in the Their ref field of all other customer invoices in all the stores defined in the **One site Code/Description and Store code table** (described in the preferences above). If the shipment number isn't found in any of these customer invoices then processing can continue as normal. If the shipment number is found the shipment is not processed:
Line 74: Line 70:
  
 ==== Pick lists ==== ==== Pick lists ====
-On finalisation of a customer invoice (carried out on one of the satellites), a pick list file needs to be created on the server. To do this, on customer invoice finalisation a sync message (type 'axiosRequestFilesCreate') is sent to the server. That message is processed by the sync queue and turned into a pick list file which is stored locally to await upload to the remote SFTP server according to the schedule.+On finalisation of a customer invoice, a pick list file is created on the server and sent to NHLMIS. To do this, on customer invoice finalisation a sync message (type 'axiosRequestFilesCreate') is sent to the server. That message is processed by the sync queue and turned into a pick list file which is stored locally to await upload to the remote SFTP server according to the schedule. 
 + 
 +The pick list files generated by mSupply have the filename format: ''Axios.PickList//ddmmyyyyhhmmss//ONE-S-//shipment Id//-//random number//.csv.ready'' 
 + 
 +where: 
 +  * ''//ddmmyyyyhhmmss//'' is the date and time the file was created 
 +  * ''//shipment Id//'' is the ID of the shipment sent from the One Network that this pick list belongs to 
 +  * ''//random number//'' is a 5 digit random number 
 + 
 +An example is: ''Axios.PickList26072019155745ONE-S-15049-30604.csv.ready''
  
 === Pick list detail === === Pick list detail ===
Line 82: Line 87:
 There are 4 types of files that are sent automatically once a day at the time set in the preferences. They are: There are 4 types of files that are sent automatically once a day at the time set in the preferences. They are:
  
-1. Lot file (filename Axios.Lotddmmyyyy.csv.ready) +1. **Lot file** (filename Axios.//site_code//.Lot//ddmmyyyy//.csv.ready): Contains a line for each unique batch in stock in the site (main store plus secondary store).
-Contains a line for each unique batch in stock in the site (main store plus secondary store). +
- +
-2. Inventory file (filename ) +
  
-3. Buffer file (filename )+2. **Inventory file** (filename Axios.//site_code//.Inventory//ddmmyyyy//.csv.ready): Contains a line for each line of stock which is not on hold and is assigned a funder (transaction category with a code assigned to the supplier invoice the stock was received on).
  
 +3. **Buffer file** (filename Axiois.//site_code//.Buffer//ddmmyyyy//.csv.ready): Contains a line for each unique batch which has stock for each item for each funder (transaction category with a code assigned to the supplier invoice the stock was received on) which is not on hold. Batches with no funder are ignored.
  
-4. BOH file (filename )+4. **BOH file** (filename Axios.//site_code//.BOH//ddmmyyyy//.csv.ready): Contains the same lines as the Buffer file but with different information for each line.
  
 +A set of all 4 files is created for each row in the **COMS site Code/Description and Store code** table in the preferences. All the files are csv type and are created at the same time. The BOH and Buffer files for all sites are sent immediately but the Lot and inventory files are sent after the delay time ("**Time (from creation) to wait before uploading inventory files**") set in the preferences.
 ===== Filenames ===== ===== Filenames =====
 ==== Pick lists ==== ==== Pick lists ====
  • Last modified: 2026/09/25 15:43
  • by Gary Willetts