Merge pull request #1546 from hapifhir/2024-01-gg-fix-debug

2024 01 gg fix debug
This commit is contained in:
Grahame Grieve 2024-01-18 12:48:45 +11:00 committed by GitHub
commit 7bd7cb74c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 36 additions and 19 deletions

View File

@ -1,7 +1,9 @@
## Validator Changes
* no changes
* Remove debugging code hiding error from server
## Other code changes
* no changes
* fix broken links rendering questionnaires
* render target profiles on operation definition parameters
* fix up cvx importer

View File

@ -66,7 +66,7 @@ public class CVXImporter {
Element cvxCodes = xml.getDocumentElement();
for (Element cvsInfo : XMLUtil.getNamedChildren(cvxCodes, "CVXInfo")) {
String desc = XMLUtil.getNamedChildText(cvsInfo, "ShortDescription").trim();
String name = XMLUtil.getNamedChildText(cvsInfo, "FullVaccinename").trim();
String fullName = XMLUtil.getNamedChildText(cvsInfo, "FullVaccinename").trim();
String code = XMLUtil.getNamedChildText(cvsInfo, "CVXCode").trim();
String notes = XMLUtil.getNamedChildText(cvsInfo, "Notes");
String status = XMLUtil.getNamedChildText(cvsInfo, "Status").trim();
@ -78,8 +78,8 @@ public class CVXImporter {
} else {
def.getDesignation().clear();
}
def.setDisplay(name);
def.addDesignation().setValue(desc).setLanguage("en").setUse(new Coding().setSystem("http://snomed.info/sct").setCode("900000000000013009").setDisplay("Synonym"));
def.setDisplay(desc);
def.addDesignation().setValue(fullName).setLanguage("en").setUse(new Coding().setSystem("http://snomed.info/sct").setCode("900000000000013009").setDisplay("Synonym"));
if (!Utilities.noString(notes)) {
def.forceProperty("notes").setValue(new StringType(notes.trim()));
}

View File

@ -295,7 +295,6 @@ public class FhirRequestBuilder {
OperationOutcome error = null;
try {
byte[] body = response.body().bytes();
TextFile.bytesToFile(body, "/Users/grahamegrieve/temp/http-body.txt");
String contentType = response.header("Content-Type");
if (body != null) {
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader())

View File

@ -3449,10 +3449,12 @@ public class ProfileUtilities extends TranslatingUtilities {
@Override
public int compare(ElementDefinitionHolder o1, ElementDefinitionHolder o2) {
if (o1.getBaseIndex() == 0)
if (o1.getBaseIndex() == 0) {
o1.setBaseIndex(find(o1.getSelf().getPath(), true));
if (o2.getBaseIndex() == 0)
}
if (o2.getBaseIndex() == 0) {
o2.setBaseIndex(find(o2.getSelf().getPath(), true));
}
return o1.getBaseIndex() - o2.getBaseIndex();
}
@ -3545,11 +3547,6 @@ public class ProfileUtilities extends TranslatingUtilities {
}
paths.add(elt.getPath());
}
if(!hasSlicing) {
// if Differential does not have slicing then safe to pre-sort the list
// so elements and subcomponents are together
Collections.sort(diffList, new ElementNameCompare());
}
processElementsIntoTree(edh, i, diff.getDifferential().getElement());

View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.FHIRTypes;
@ -141,6 +142,20 @@ public class OperationDefinitionRenderer extends TerminologyRenderer {
}
} else
td.ah(sd.getWebPath()).tx(actualType);
if (p.hasTargetProfile()) {
td.tx(" (");
boolean first = true;
for (CanonicalType tp : p.getTargetProfile()) {
if (first) { first = false;} else {td.tx(", ");};
StructureDefinition sdt = context.getWorker().fetchTypeDefinition(tp.asStringValue());
if (sdt == null || !sdt.hasWebPath()) {
td.code().tx(tp.asStringValue());
} else {
td.ah(sdt.getWebPath(), tp.asStringValue()).tx(sdt.present());
}
}
td.tx(")");
}
if (p.hasSearchType()) {
td.br();
td.tx("(");

View File

@ -282,7 +282,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
flags.addPiece(gen.new Piece(getSDCLink("StructureDefinition-sdc-questionnaire-displayCategory.html"), null, "Category: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
flags.addPiece(gen.new Piece("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", null, "Category: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
}
}
Cell defn = gen.new Cell();
@ -731,7 +731,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
hasFlag = true;
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-displayCategory"), "Category: "+code).img(getImgPath("icon-qi-" + code + ".png"), "icon");
flags.ah("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", "Category: "+code).img(getImgPath("icon-qi-" + code + ".png"), "icon");
}
if (i.hasMaxLength()) {

View File

@ -470,7 +470,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
// CodeableConcept cc = i.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").getValueCodeableConcept();
// String code = cc.getCode("http://hl7.org/fhir/QuestionnaireResponse-display-category");
// hasFlag = true;
// flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-displayCategory", "Category: "+code).img(Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"));
// flags.ah("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", "Category: "+code).img(Utilities.path(context.getLocalPrefix(), "icon-qi-"+code+".png"));
// }
//
// if (i.hasMaxLength()) {
@ -742,7 +742,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
// render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").getValue());
// }
// if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-hidden")) {
// defn(tbl, "Hidden Item", "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory", "This item is a hidden question", null);
// defn(tbl, "Hidden Item", "https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", "This item is a hidden question", null);
// }
// if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-optionalDisplay")) {
// defn(tbl, "Hidden Item", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-optionalDisplay", "This item is optional to display", null);

View File

@ -65,6 +65,7 @@ public class I18nConstants {
public static final String CODESYSTEM_CS_UNK_EXPANSION = "CODESYSTEM_CS_UNK_EXPANSION";
public static final String CODE_FOUND_IN_EXPANSION_HOWEVER_ = "Code_found_in_expansion_however_";
public static final String CODING_HAS_NO_SYSTEM__CANNOT_VALIDATE = "Coding_has_no_system__cannot_validate";
public static final String Coding_has_no_system__cannot_validate_NO_INFER = "Coding_has_no_system__cannot_validate_NO_INFER";
public static final String CONTAINED_RESOURCE_DOES_NOT_APPEAR_TO_BE_A_FHIR_RESOURCE_UNKNOWN_NAME_ = "Contained_resource_does_not_appear_to_be_a_FHIR_resource_unknown_name_";
public static final String Could_not_match_discriminator_for_slice_in_profile = "Could_not_match_discriminator_for_slice_in_profile";
public static final String DEFINED_IN_THE_PROFILE = "defined_in_the_profile";

View File

@ -482,6 +482,7 @@ Code_found_in_expansion_however_ = Code found in expansion, however: {0}
None_of_the_provided_codes_are_in_the_value_set_one = The provided code {2} was not found in the value set ''{1}''
None_of_the_provided_codes_are_in_the_value_set_other = None of the provided codes [{2}] are in the value set ''{1}''
Coding_has_no_system__cannot_validate = Coding has no system. A code with no system has no defined meaning, and it cannot be validated. A system should be provided
Coding_has_no_system__cannot_validate_NO_INFER = Coding has no system, and inferring the code system is not possible in this context. A code with no system has no defined meaning, and it cannot be validated. A system should be provided
Unable_to_handle_system__concept_filter_with_op__ = Unable to handle system {0} concept filter with op = {1}
UNABLE_TO_HANDLE_SYSTEM__PROPERTY_FILTER_WITH_OP__ = Unable to handle system {0} property filter with op = {1}
Unable_to_handle_system__filter_with_property__ = Unable to handle system {0} filter with property = {1}, op = {2}

View File

@ -2,5 +2,7 @@
"http://somewhere/something-else" : null,
"http://loinc.org/vs/LL715-4" : null,
"http://hl7.org/fhir/us/vrdr/ValueSet/vrdr-PlaceOfDeath" : null,
"http://somewhere/something" : null
"http://somewhere/something" : null,
"https://fhir.infoway-inforoute.ca/ValueSet/issuetype|20190415" : null,
"https://fhir.infoway-inforoute.ca/ValueSet/issueseverity|20190415" : null
}

View File

@ -20,7 +20,7 @@
<properties>
<guava_version>32.0.1-jre</guava_version>
<hapi_fhir_version>6.4.1</hapi_fhir_version>
<validator_test_case_version>1.4.24</validator_test_case_version>
<validator_test_case_version>1.4.25</validator_test_case_version>
<jackson_version>2.16.0</jackson_version>
<junit_jupiter_version>5.9.2</junit_jupiter_version>
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>