Reflection: Sprint 5

It took couple of days to trace down our new issue ‘APTS-296’. We all, as a team, had difficulty of tracing through the code. The main hindrance was the huge code base of the OpenMRS project.

We tried to find where they are storing the week’s list. At first, we could not find anywhere in the ng2-arms files that reference the week. We tried to find the reference in likely directories such as form and formentry. After using, webstorm we were able to found that the week was referenced in a node module package called date-time-picker. The actual issue was not located at all in the ng2-arms directory but in a npm webpack.

This is what Date-Time-Picker TS file looks like:

export class DateTimePickerComponent implements OnInit, ControlValueAccessor {

@Input() weeks: number[] = [2, 4, 6, 8, 16, 24];

Here is the weeks list, in the list it has 24 but it will only display up to 16 weeks. Weeks is basically pre-set to [2,4,6,16] no matter what is put in there.

Our solution for this APTS-296 issue was to:

  • Add a new input file in the TS file
  • @Input() testing: number[] = [2, 4, 6, 8, 16, 24, 36];
  • In the html, change weeks into testing
  • <li (click)=”weeksSelected(count)” *ngFor=”let count of testing”><span> {{count}} Weeks</span></li>

This display in the drop down menu weeks 24 and 36

We finally were able to fix the issue, and ran it successfully on the AMPATH test server 2. But the thing we are currently getting suck in order to push our changes is the module we modified is not a part of ng2-amrs src code. It seems to be using a 3rd party npm-plugin which is located under ‘node_modules’ outside of the src code folder.

We must ask AMPATH developers if we could override the npm modules, if yes, then how.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s