NHSDigital / DataDictionaryPublication

Apache License 2.0
7 stars 1 forks source link

Adding Format/Length when creating Data Elements #590

Open AngelaFaulding opened 1 month ago

AngelaFaulding commented 1 month ago

Kate had an issue with one of her CRs:

CR8007 - National Hair Colour Data Set Version 2 (although the orchestrator preview is working). I have the error message:

{ "headers": { "normalizedNames": {}, "lazyUpdate": null }, "status": 500, "statusText": "OK", "url": "https://mauro.dev.dataproducts.nhs.uk/api/nhsdd/b8b85e7a-8f33-47c1-8cf9-941575486aa9/preview/changePaper?includeDataSets=true", "ok": false, "name": "HttpErrorResponse", "message": "Http failure response for https://mauro.dev.dataproducts.nhs.uk/api/nhsdd/b8b85e7a-8f33-47c1-8cf9-941575486aa9/preview/changePaper?includeDataSets=true: 500 OK", "error": { "status": 500, "reason": "Internal Server Error", "errorCode": "UEX--", "message": "Cannot invoke \"Object.toString()\" because \"value\" is null", "path": "/api/nhsdd/b8b85e7a-8f33-47c1-8cf9-941575486aa9/preview/changePaper", "version": "5.4.0-SNAPSHOT", "exception": { "type": "NullPointerException", "message": "Cannot invoke \"Object.toString()\" because \"value\" is null", "stacktrace": [ "groovy.xml.MarkupBuilderHelper.yield(MarkupBuilderHelper.java:44)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement$_createFormatLengthChangeHtml_closure11$_closure26$_closure27$_closure30.doCall(NhsDDElement.groovy:365)", "groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)", "groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:74)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement$_createFormatLengthChangeHtml_closure11$_closure26$_closure27.doCall(NhsDDElement.groovy:364)", "groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)", "groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:74)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement$_createFormatLengthChangeHtml_closure11$_closure26.doCall(NhsDDElement.groovy:347)", "groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)", "groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:74)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement$_createFormatLengthChangeHtml_closure11.doCall(NhsDDElement.groovy:345)", "groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)", "groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:74)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement.createFormatLengthChangeHtml(NhsDDElement.groovy:344)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement.createFormatLengthChange(NhsDDElement.groovy:326)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDDElement.buildComponentDetailsChangeList(NhsDDElement.groovy:246)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDataDictionaryComponent$Trait$Helper.buildChangeList(NhsDataDictionaryComponent.groovy:211)", "uk.nhs.digital.maurodatamapper.datadictionary.NhsDataDictionaryComponent$Trait$Helper.getChanges(NhsDataDictionaryComponent.groovy:204)", "uk.nhs.digital.maurodatamapper.datadictionary.publish.changePaper.ChangePaper$_compareMaps_closure6.doCall(ChangePaper.groovy:357)", "uk.nhs.digital.maurodatamapper.datadictionary.publish.changePaper.ChangePaper.compareMaps(ChangePaper.groovy:355)", "uk.nhs.digital.maurodatamapper.datadictionary.publish.changePaper.ChangePaper.calculateChanges(ChangePaper.groovy:264)", "uk.nhs.digital.maurodatamapper.datadictionary.publish.changePaper.ChangePaper.(ChangePaper.groovy:231)", "uk.ac.ox.softeng.maurodatamapper.plugins.nhsdd.NhsDataDictionaryService.$tt__previewChangePaper(NhsDataDictionaryService.groovy:864)", "grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)", "org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)", "grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)", "uk.ac.ox.softeng.maurodatamapper.plugins.nhsdd.NhsDataDictionaryController.previewChangePaper(NhsDataDictionaryController.groovy:101)", "org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)", "org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)", "org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)", "org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)", "org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)", "org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)", "org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)", "org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)", "org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)", "org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)", "org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)", "org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)", "org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)", "org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)" ] } } }

This has been caused as one of the Data Elements has a missing "Format/Length".

Peter said "I can fix it to not break when there is no "Format/Length" defined, but for now if you knew which elements were changed you could enter one".

This was discussed on the call on 30/09/24 and Peter will fix it so a Format/Length has to be input.

This would be any text as we have entries such as an, an10 CCYY-MM-DD, an8 HH:MM:SS, n2, an1, an250 etc.

AngelaFaulding commented 1 month ago

14/10/24 - this has been fixed and will deployed this afternoon.

pjmonks commented 1 month ago

A fix for Format/Length has been deployed to TEST. I can now run a change paper for the CR8007 branch without issue.

AngelaFaulding commented 1 month ago

Tested with an item with no format/length and the CR has run:

image