More consistent version management in TerminologyCache

This commit is contained in:
dotasek 2022-01-23 13:21:40 -05:00
parent cf188cd156
commit 33cdfffa55
1 changed files with 6 additions and 3 deletions

View File

@ -186,11 +186,13 @@ public class TerminologyCache {
public CacheToken generateValidationToken(ValidationOptions options, Coding code, ValueSet vs) {
CacheToken ct = new CacheToken();
if (code.hasSystem())
if (code.hasSystem()) {
ct.name = getNameForSystem(code.getSystem());
ct.hasVersion = code.hasVersion();
}
else
ct.name = NAME_FOR_NO_SYSTEM;
ct.hasVersion = code.hasVersion();
JsonParser json = new JsonParser();
json.setOutputStyle(OutputStyle.PRETTY);
ValueSet vsc = getVSEssense(vs);
@ -216,10 +218,11 @@ public class TerminologyCache {
public CacheToken generateValidationToken(ValidationOptions options, CodeableConcept code, ValueSet vs) {
CacheToken ct = new CacheToken();
for (Coding c : code.getCoding()) {
if (c.hasSystem())
if (c.hasSystem()) {
ct.setName(getNameForSystem(c.getSystem()));
ct.hasVersion = c.hasVersion();
}
}
JsonParser json = new JsonParser();
json.setOutputStyle(OutputStyle.PRETTY);
ValueSet vsc = getVSEssense(vs);