Source:
<code>public void addModelAttributes(PageModel model, Patient patient, AppDescriptor app, PatientIdentifierType primaryIdentifierType, String breadcrumbOverride, AppFrameworkService appFrameworkService) throws Exception { NavigableFormStructure formStructure = RegisterPatientFormBuilder.buildFormStructure(app); if (patient == null) { patient = new Patient(); } NameSupportCompatibility nameSupport = Context.getRegisteredComponent(NameSupportCompatibility.ID, NameSupportCompatibility.class); AddressSupportCompatibility addressSupport = Context.getRegisteredComponent(AddressSupportCompatibility.ID, AddressSupportCompatibility.class); model.addAttribute("patient", patient); model.addAttribute("primaryIdentifierType", primaryIdentifierType); model.addAttribute("appId", app.getId()); model.addAttribute("formStructure", formStructure); model.addAttribute("nameTemplate", nameSupport.getDefaultLayoutTemplate()); model.addAttribute("addressTemplate", addressSupport.getAddressTemplate()); model.addAttribute("includeRegistrationDateSection", !app.getConfig().get("registrationEncounter").isNull() && !app.getConfig().get("allowRetrospectiveEntry").isNull() && app.getConfig().get("allowRetrospectiveEntry").getBooleanValue() ); model.addAttribute("allowUnknownPatients", app.getConfig().get("allowUnknownPatients").getBooleanValue()); model.addAttribute("allowManualIdentifier", app.getConfig().get("allowManualIdentifier").getBooleanValue()); model.addAttribute("patientDashboardLink", app.getConfig().get("patientDashboardLink") !=null ? app.getConfig().get("patientDashboardLink").getTextValue() : null); model.addAttribute("enableOverrideOfAddressPortlet", Context.getAdministrationService().getGlobalProperty("addresshierarchy.enableOverrideOfAddressPortlet", "false")); model.addAttribute("breadcrumbOverride", breadcrumbOverride); model.addAttribute("relationshipTypes", Context.getPersonService().getAllRelationshipTypes()); <START> List<Extension> includeJavaScriptFragments = appFrameworkService.getExtensionsForCurrentUser("registerPatient.includeJavaScriptFragments"); <END> Collections.sort(includeJavaScriptFragments); model.addAttribute("includeJavaScriptFragments", includeJavaScriptFragments); }</code><technical_language>I call this "includeFragments", theortically include other Javascript (though is 90% of time Javascript... I guess custom CSS another cse)</technical_language>

Target:
public void addModelAttributes(PageModel model, Patient patient, AppDescriptor app, PatientIdentifierType primaryIdentifierType, String breadcrumbOverride, AppFrameworkService appFrameworkService) throws Exception { NavigableFormStructure formStructure = RegisterPatientFormBuilder.buildFormStructure(app); if (patient == null) { patient = new Patient(); } NameSupportCompatibility nameSupport = Context.getRegisteredComponent(NameSupportCompatibility.ID, NameSupportCompatibility.class); AddressSupportCompatibility addressSupport = Context.getRegisteredComponent(AddressSupportCompatibility.ID, AddressSupportCompatibility.class); model.addAttribute("patient", patient); model.addAttribute("primaryIdentifierType", primaryIdentifierType); model.addAttribute("appId", app.getId()); model.addAttribute("formStructure", formStructure); model.addAttribute("nameTemplate", nameSupport.getDefaultLayoutTemplate()); model.addAttribute("addressTemplate", addressSupport.getAddressTemplate()); model.addAttribute("includeRegistrationDateSection", !app.getConfig().get("registrationEncounter").isNull() && !app.getConfig().get("allowRetrospectiveEntry").isNull() && app.getConfig().get("allowRetrospectiveEntry").getBooleanValue() ); model.addAttribute("allowUnknownPatients", app.getConfig().get("allowUnknownPatients").getBooleanValue()); model.addAttribute("allowManualIdentifier", app.getConfig().get("allowManualIdentifier").getBooleanValue()); model.addAttribute("patientDashboardLink", app.getConfig().get("patientDashboardLink") !=null ? app.getConfig().get("patientDashboardLink").getTextValue() : null); model.addAttribute("enableOverrideOfAddressPortlet", Context.getAdministrationService().getGlobalProperty("addresshierarchy.enableOverrideOfAddressPortlet", "false")); model.addAttribute("breadcrumbOverride", breadcrumbOverride); model.addAttribute("relationshipTypes", Context.getPersonService().getAllRelationshipTypes()); List<Extension> includeFragments = appFrameworkService.getExtensionsForCurrentUser("registerPatient.includeFragments"); Collections.sort(includeFragments); model.addAttribute("includeFragments", includeFragments); }