Skip to content

Conversation

Dutervil
Copy link
Contributor

@Dutervil Dutervil commented Sep 9, 2025

Creating controller and .gsp file for Prenatal Visit Status @mogoodrich @louidorjp

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Thanks @Dutervil and sorry for the delay in reviewing!

This generally looks good, my main comment is since this just appears to be a copy of the StatusFragmentController with some new functionality, could we just expand the StatusFragmentController to support date parsing and the other formatting support we made here, or do we need this new class?

I'm happy to keep this as-is if need be, but I'd also supportive of adding new functionality to statusData.gsp if that makes things easier.

@mseaton mseaton self-requested a review September 12, 2025 11:21
Copy link
Member

@mseaton mseaton left a comment

Choose a reason for hiding this comment

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

@Dutervil - I tend to agree with @mogoodrich . Can you explain the purpose of this new controller and file? Why are we adding this in?

@louidorjp
Copy link
Member

louidorjp commented Sep 12, 2025

FYI @mseaton , @mogoodrich, @Dutervil
I think the reason Wadson created this new controller and this new file is that he couldn’t display the widget’s icon and title. To solve this problem @Dutervil , you need to modify the mch_dashboard_app.json file like this `

{
  "id": "mch.dashboard.prenatalVisits",
  "order": 1,
  "icon": "fas fa-user-md fa-fw",
  "label": "mch.dashboard.prenatalVisits",
  "config": {
    "configFile":"mch/statuses.yml"
  },
  "extensions": [
    {
      "id": "mch.dashboard.prenatalVisits`.extension",
      "appId": "mch.dashboard.prenatalVisits",
      "extensionPointId": "${program.mch.uuid}.secondColumnFragments",
      "order": 1,
      "requiredPrivilege": "${privilege.app_coreapps_patient_dashboard}",
      "require": "",
      "extensionParams": {
        "provider": "pihcore",
        "fragment": "dashboardwidgets/statusData"
      }
    }
  ]
}

 and VisitStatusFragmentController.java
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