Closed mark-prins closed 3 months ago
Just checking in the pref
object, is the success: true
just from the silly pattern in 4D desktop where we inadvertently put that property in pref objects, but it was really just indicating the pref was "retrieved successfully" from the database?
Is quote_line
intentional? Are we doing quotes in custom data? May lead to confusion once tendering+quotes are in the OMS mix.
I may only have a small part of the picture, but is this basically facility surveying functionality? Broadly speaking if there may be demand for surveying sites in mSupply then we could formally table it out as configurable surveying questions rather than custom data.
On that note, Legacy mSupply regimens is basically surveying and at the time I wish we called it surveys rather than regimens - just as a more laymen naming scheme 😁. I don't think we should reuse the regimen system, though.
@mark-prins - not sure if relevant at this stage, but just wanted to point out that CCE Donor
will apply at the individual CCE level, not the facility level
Also I think we'll need both Facility type
(Clinic, Referral Hospital, National Vaccine Store etc) and Facility ownership
(Private, Government, NGO etc)
I only had a quick glance at this, have some preliminary questions:
Would it be better to have this data (for this use case) against a name record ? Can we only collect data against a store ?
The mSupply central server WILL NOT see the edited values! we will have to run reporting from the omSupply central server - the advantage though is that we don't need to have messages sent to mSupply to update the store record, or have records updated by multiple sites.
This would mean that data needs to be available on omSupply central, but we can always push that data to omSupply central as well.
This will then allow an administrator working on the mSupply central server to add custom fields, edit the data saved against stores and have this sync out to remote sites.
Similar to the previous comment. If we can edit data for this store in mSupply, would we expect it available in omSupply central ? If so it becomes tricky.
In terms of JSON data vs typed data (stored in optional typed columns), the former is a bit trickier for reporting in sqlite, but since reporting will be done on omSupply central, which will be postgres, then it should be possible.
I assume, for list
type, the key
would be the stored value and the value
is what is shown in UI ?
Do we currently allow editing of custom data for remote site on central in mSupply ? Maybe we should look at doing it in omSupply central ?
Would it be better to have this data (for this use case) against a name record ? Can we only collect data against a store ?
Good point @andreievg
Some more context:
The things we need to collect are:
There are 3 modes of operation (that I can think of) in which the GAPS tool will need to operate:
Using Stores would work for all of the above modes of operation BUT if the country is also using Open mSupply as their eLMIS then in mode 3 there may possibly be implications if Stores are created for those facilities that are not using Open mSupply?
Although the only thing I can think of is that supplier invoices build up - I can't really see how that's much of an issue to be honest?
Thanks @Chris-Petty - the success: true
and quote_line
were both artefacts from mSupply, have updated the example.
Thanks @adamdewey - noted re the donor and the other fields.
Would it be better to have this data (for this use case) against a name record?
Seems about the same to me; the specs talk of 'facility' so I went with 'store'. Don't really mind either way;
This would mean that data needs to be available on omSupply central, but we can always push that data to omSupply central
one of those omSupply central
should be mSupply central
.. but which one? 🤔
Working with Adam's comment above, the 'editing on OG central' use case becomes only 'import on OG central' which is a relief! that's much better to accomodate, isn't it?
I assume, for list type, the key would be the stored value and the value is what is shown in UI ?
oh, yeah. That's what OG is giving us - afaics this is only set to an empty string in OG and not used as a value
Do we currently allow editing of custom data for remote site on central in mSupply ? Maybe we should look at doing it in omSupply central ?
The user story has the remote site entering their own data, I'm not sure how editing on omSupply central would help in this case.
The user story has the remote site entering their own data, I'm not sure how editing on omSupply central would help in this case.
Even thought that's the user story, I think we definitely need to manage/handle the central server only config scenario, as many of the target users won't have an existing mSupply installation...
Even thought that's the user story, I think we definitely need to manage/handle the central server only config scenario, as many of the target users won't have an existing mSupply installation...
Yes I agree, I was sort of thinking they could log into the Store and edit the data there - but that might possibly be too cumbersome?
But it does seem like a possible way to do it without any extra work on our part at this stage? Hmm
Part of epic #3660
Acceptance criteria
Is your feature request related to a problem? Please describe 👀
There are several properties that we'd like to collect which are associated to a store. The proposal is to add these as custom fields in mSupply - this issue is to save that data in open mSupply.
Solution B.1.1 The system will allow central users to categorize facilities into ‘n’ customisable administrative levels. Each facility will only be able to belong to one administrative level.
Solution B.1.2 The system will allow central users to categorize facilities into ‘n’ customisable facility types. Each facility will only be able to belong to one facility type.
Solution B.1.3 The system will allow central users to categorize facilities into ‘n’ customisable ownership types. Each facility will only be able to belong to one ownership type.
Solution B.1.5 The system will aggregate energy infrastructure data that has been captured by facilities to the central level. If the system is not distributed then all facility energy infrastructure data will be input by the central user(s).
Solution B.1.5.1 The system will allow facility users to indicate their current energy infrastructure by choosing each type of energy source (electricity, solar, gas, kerosene) and the availability The options to choose from will resemble:
Describe the solution you'd like 🎁
custom_data
column toname
tablecustom_data
field to thename
transformationSample pref object:
and a populated custom data record looks like this:
This will then allow an administrator working on the mSupply central server to add custom fields, edit the data saved against names and have this sync out to remote sites. Remote sites can then see the populated fields and can edit values, which would then sync to mSupply central. This does bend sync rules, in the same way that editing patients does. It does allow reporting / grafana to run from the mSupply central server if required.
Describe alternatives you've considered 💭
[store]
custom_data
field synchronised and editable on central and remote ( it's a much more complex solution )Additional context 💌
New table:
The
name
table has a column added forcustom_data
which is TEXT and nullable.Moneyworks Jobcode 🧰
CCEIDEV