fixes for processing code validation outcomes

This commit is contained in:
Grahame Grieve 2021-08-27 10:41:43 +10:00
parent 7d2c03285c
commit 3d1676170a
2 changed files with 11 additions and 2 deletions

View File

@ -626,7 +626,13 @@ public interface IWorkerContext {
return message != null; return message != null;
} }
public Coding asCoding() {
if (isOk() && definition != null && definition.getCode() != null) {
return new Coding(system, definition.getCode(), definition.getDisplay());
} else {
return null;
}
}
} }
/** /**

View File

@ -124,6 +124,9 @@ public interface ValueSetExpander {
return allErrors; return allErrors;
} }
public boolean isOk() {
return (allErrors.isEmpty() || (allErrors.size() == 1 && allErrors.get(0) == null)) && error == null;
}
} }
/** /**
* *