Skip to content

Commit

Permalink
Revert "Merge pull request #23 from openmrs/feat/support_prev_obs"
Browse files Browse the repository at this point in the history
This reverts commit 0441423, reversing
changes made to 8be1666.
ibacher committed Dec 20, 2022
1 parent f695ad0 commit 5cb44d5
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -14,22 +14,19 @@ export class HistoricalHelperService {

public evaluate(
expr: string,
dataSources: Record<string, unknown>,
additionalScopeValues: Record<string, unknown> | null,
) {
dataSources: any,
additionalScopevalues: any
): any {
const HD = new HistoricalEncounterDataService();
HD.registerEncounters('prevEnc', dataSources['rawPrevEnc']);
if (dataSources.hasOwnProperty('rawPrevObs')) {
HD.registerEncounters('prevObs', dataSources['rawPrevObs']);
}

const deps = { HD };
const deps: any = {
HD: HD
};

if (additionalScopeValues) {
for (const o in additionalScopeValues) {
const value = additionalScopeValues[o];
if (typeof value !== 'undefined' && value !== null) {
deps[o] = value;
if (additionalScopevalues) {
for (const o in additionalScopevalues) {
if (additionalScopevalues[o]) {
deps[o] = additionalScopevalues[o];
}
}
}

0 comments on commit 5cb44d5

Please sign in to comment.