Both rules-server and webapp use response/request from avni-server. In both cases, to be able to use model functions, we are doing mapping of observations of Subject/Encounter/Enrolment, etc., using mapObservations functions in both code bases. This I think has lead to duplication of code for mapping the observations.
Need:
To avoid repeating the fixes in both codebases. I think fix for this made in rules-server might to be repeated in webapp, to get the repeatable question group work in data entry app
To have the code in one place
What can be done:
Mapping of observations code can be moved to models. Already it is done partially in avni-models using fromObs methods in concept classes.
More analysis need to be done to understand why it was not done before
Case:
mapObservations
functions in both code bases. This I think has lead to duplication of code for mapping the observations.Need:
What can be done:
fromObs
methods in concept classes.