No provision to filter data based on number of visits in patient program context

There is a provision to pass the number of visits to the observation display control which will consider those visits to show data.

Observation display control:

This works fine when the patient is not enrolled in any program however there is no provision to pass the number of visits when patient is enrolled in any program.

API without program context:

@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public Collection<BahmniObservation> get(@RequestParam(value = "patientUuid", required = true) String patientUUID,
                                         @RequestParam(value = "concept", required = true) List<String> rootConceptNames,
                                         @RequestParam(value = "scope", required = false) String scope,
                                         @RequestParam(value = "numberOfVisits", required = false) Integer numberOfVisits,
                                         @RequestParam(value = "obsIgnoreList", required = false) List<String> obsIgnoreList,
                                         @RequestParam(value = "filterObsWithOrders", required = false, defaultValue = "true") Boolean filterObsWithOrders) throws ParseException {

API in program context:

    @RequestMapping(method = RequestMethod.GET, params = {"patientProgramUuid"})
@ResponseBody
public Collection<BahmniObservation> get(@RequestParam(value = "patientProgramUuid", required = true) String patientProgramUuid,
                                         @RequestParam(value = "concept", required = false) List<String> rootConceptNames,
                                         @RequestParam(value = "scope", required = false) String scope,
                                         @RequestParam(value = "obsIgnoreList", required = false) List<String> obsIgnoreList) throws ParseException {

Is there any reason for not supporting numberOfVisits under program context?

@angshuonline @buvaneswariarun @swedhan @kirity @vinisha @venkatavineela

There is one more inconsistency where patient context(API with program-uuid) is not considered in observation display control in IPD dashboard.