Skip to content

Conversation

@loichenninger
Copy link
Contributor

We will receive the raw responses in a new format. Some identifiers change of name : for example questionnaireId become collectionInstrumentId, idUE become usualSurveyUnitId.

The new Raw responses will be persisted in a new collection. Then they will be processed (transformed in the Genesis model) and persisted in the same collection "responses".

Why so much change? Technically it could be a change only in the controller layer. It was possible to only impact that side of the application and leave our domain how it was before. However, this new model is something very structuring in our information system, and I think the application’s domain should comply with it. Overall, this refactor consisted in aligning our domain with the filière model (removing questionnaireId from the domain and switching to collectionInstrumentId), and handling, at the adapter level, the reading in the database of both the old and new documents.

public DataProcessingContextModel getContextByCollectionInstrumentId(String collectionInstrumentId){
return DataProcessingContextMapper.INSTANCE.documentToModel(
dataProcessingContextPersistancePort.findByPartitionId(partitionId)
dataProcessingContextPersistancePort.findByPartitionId(collectionInstrumentId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectionInstrumentId is not a partition. Maybe change the def of "findByPartitionId" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants