Skip to content

Commit

Permalink
AllergyIntollerance Lens - Fix resourceType name
Browse files Browse the repository at this point in the history
  • Loading branch information
aalonsolopez committed May 14, 2024
1 parent 89e1023 commit 19ecbea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lenses/lens-selector-mvp2_allergyintollerance.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let enhance = async () => {

// Iterates through the IPS entry searching for conditions
ips.entry.forEach((element) => {
if (element.resource.resourceType == "Condition") {
if (element.resource.resourceType == "AllergyIntolerance") {
if (element.resource.code != undefined) {
element.resource.code.coding.forEach((coding) => {
arrayOfConditionCodes.push({
Expand All @@ -40,7 +40,7 @@ let enhance = async () => {
let compositions = 0;
let categories = [];
epi.entry.forEach((entry) => {
if (entry.resource.resourceType == "AllergyIntolerance") {
if (entry.resource.resourceType == "Composition") {
compositions++;
//Iterated through the Condition element searching for conditions
entry.resource.extension.forEach((element) => {
Expand Down

0 comments on commit 19ecbea

Please sign in to comment.