List of usage examples for java.util List removeIf
default boolean removeIf(Predicate<? super E> filter)
From source file:bwem.map.MapInitializerImpl.java
/** * 2) Find the doors in border: one door for each connected set of walkable, neighboring miniTiles. * The searched connected miniTiles all have to be next to some lake or some static building, though they can't be part of one. *//*ww w . ja v a 2 s . c om*/ @Override public List<WalkPosition> getDoors(final List<WalkPosition> border) { final List<WalkPosition> doors = new ArrayList<>(); while (!border.isEmpty()) { final WalkPosition door = border.remove(border.size() - 1); doors.add(door); final List<WalkPosition> toVisit = new ArrayList<>(); toVisit.add(door); final List<WalkPosition> visited = new ArrayList<>(); visited.add(door); while (!toVisit.isEmpty()) { final WalkPosition current = toVisit.remove(toVisit.size() - 1); final WalkPosition[] deltas = { new WalkPosition(0, -1), new WalkPosition(-1, 0), new WalkPosition(+1, 0), new WalkPosition(0, +1) }; for (final WalkPosition delta : deltas) { final WalkPosition next = current.add(delta); if (getData().getMapData().isValid(next) && !visited.contains(next)) { if (getData().getMiniTile(next, CheckMode.NO_CHECK).isWalkable()) { if (getData().getTile((next.toPosition()).toTilePosition(), CheckMode.NO_CHECK) .getNeutral() == null) { if (BwemExt.adjoins8SomeLakeOrNeutral(next, this)) { toVisit.add(next); visited.add(next); } } } } } } border.removeIf(visited::contains); } return doors; }
From source file:org.kitodo.production.services.data.ProcessService.java
/** * Check if process is assigned only to one LOGISTIC batch. * * @param batchDTOList//from ww w . j a v a 2 s . c om * list of batches for checkout * @return true or false */ boolean isProcessAssignedToOnlyOneLogisticBatch(List<BatchDTO> batchDTOList) { List<BatchDTO> result = new ArrayList<>(batchDTOList); result.removeIf(batch -> !(batch.getType().equals("LOGISTIC"))); return result.size() == 1; }
From source file:org.kitodo.production.services.data.ProcessService.java
/** * Returns the batches of the desired type for a process. * * @param type/*from w ww. j a va 2 s . co m*/ * of batches to return * @return all batches of the desired type */ public List<Batch> getBatchesByType(Process process, BatchType type) { List<Batch> batches = process.getBatches(); if (Objects.nonNull(type)) { List<Batch> result = new ArrayList<>(batches); result.removeIf(batch -> !(batch.getType().equals(type))); return result; } return batches; }
From source file:net.dv8tion.jda.core.managers.GuildController.java
/** * Modifies the complete {@link net.dv8tion.jda.core.entities.Role Role} set of the specified {@link net.dv8tion.jda.core.entities.Member Member} * <br>The provided roles will replace all current Roles of the specified Member. * * <p><u>The new roles <b>must not</b> contain the Public Role of the Guild</u> * * <h1>Warning</h1>// w w w . j ava2 s.c om * <b>This may <u>not</u> be used together with any other role add/remove/modify methods for the same Member * within one event listener cycle! The changes made by this require cache updates which are triggered by * lifecycle events which are received later. This may only be called again once the specific Member has been updated * by a {@link net.dv8tion.jda.core.events.guild.member.GenericGuildMemberEvent GenericGuildMemberEvent} targeting the same Member.</b> * * <p>Possible {@link net.dv8tion.jda.core.requests.ErrorResponse ErrorResponses} caused by * the returned {@link net.dv8tion.jda.core.requests.RestAction RestAction} include the following: * <ul> * <li>{@link net.dv8tion.jda.core.requests.ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS} * <br>The Members Roles could not be modified due to a permission discrepancy</li> * * <li>{@link net.dv8tion.jda.core.requests.ErrorResponse#MISSING_ACCESS MISSING_ACCESS} * <br>We were removed from the Guild before finishing the task</li> * * <li>{@link net.dv8tion.jda.core.requests.ErrorResponse#UNKNOWN_MEMBER UNKNOWN_MEMBER} * <br>The target Member was removed from the Guild before finishing the task</li> * </ul> * * @param member * A {@link net.dv8tion.jda.core.entities.Member Member} of which to override the Roles of * @param roles * New collection of {@link net.dv8tion.jda.core.entities.Role Roles} for the specified Member * * @throws net.dv8tion.jda.core.exceptions.GuildUnavailableException * If the guild is temporarily not {@link net.dv8tion.jda.core.entities.Guild#isAvailable() available} * @throws net.dv8tion.jda.core.exceptions.PermissionException * If the provided roles are higher in the Guild's hierarchy * and thus cannot be modified by the currently logged in account * @throws IllegalArgumentException * <ul> * <li>If any of the provided arguments is {@code null}</li> * <li>If any of the provided arguments is not from this Guild</li> * <li>If any of the specified {@link net.dv8tion.jda.core.entities.Role Roles} is managed</li> * <li>If any of the specified {@link net.dv8tion.jda.core.entities.Role Roles} is the {@code Public Role} of this Guild</li> * </ul> * * @return {@link net.dv8tion.jda.core.requests.restaction.AuditableRestAction AuditableRestAction} * * @see #modifyMemberRoles(Member, Collection) */ @CheckReturnValue public AuditableRestAction<Void> modifyMemberRoles(Member member, Collection<Role> roles) { checkAvailable(); Checks.notNull(member, "member"); Checks.notNull(roles, "roles"); checkGuild(member.getGuild(), "member"); roles.forEach(role -> { Checks.notNull(role, "role in collection"); checkGuild(role.getGuild(), "role: " + role.toString()); checkPosition(role); }); if (roles.contains(guild.getPublicRole())) throw new IllegalArgumentException( "Cannot add the PublicRole of a Guild to a Member. All members have this role by default!"); //Make sure that the current managed roles are preserved and no new ones are added. List<Role> currentManaged = roles.stream().filter(Role::isManaged).collect(Collectors.toList()); List<Role> newManaged = roles.stream().filter(Role::isManaged).collect(Collectors.toList()); if (currentManaged.size() != 0 || newManaged.size() != 0) { currentManaged.removeIf(newManaged::contains); if (currentManaged.size() > 0) throw new IllegalArgumentException( "Cannot remove managed roles from a member! Roles: " + currentManaged.toString()); if (newManaged.size() > 0) throw new IllegalArgumentException( "Cannot add managed roles to a member! Roles: " + newManaged.toString()); } //This is identical to the rest action stuff in #modifyMemberRoles(Member, Collection<Role>, Collection<Role>) JSONObject body = new JSONObject().put("roles", roles.stream().map(Role::getId).collect(Collectors.toList())); Route.CompiledRoute route = Route.Guilds.MODIFY_MEMBER.compile(guild.getId(), member.getUser().getId()); return new AuditableRestAction<Void>(guild.getJDA(), route, body) { @Override protected void handleResponse(Response response, Request<Void> request) { if (response.isOk()) request.onSuccess(null); else request.onFailure(response); } }; }
From source file:femr.util.startup.MedicationDatabaseSeeder.java
/** * Puts a concept medication together for adding. * * @param conceptMedications a list of all currently available concept medications to compare against exisiting ones, not null * @param conceptMedicationFormMap a map of all medication forms available, not null * @param conceptMedicationGenericStrengths a list of the generic medications for the new concept, not null * @param brandName brand name of the new medication, may be null * @param form form of the new medication, may be null * @return a new ConceptMedication or null if errors or null if the concept medication already exists *//* w w w . jav a2 s . co m*/ private ConceptMedication addConceptMedication(List<? extends IMedication> conceptMedications, Map<String, Integer> conceptMedicationFormMap, List<IMedicationGenericStrength> conceptMedicationGenericStrengths, String brandName, String form) { if (conceptMedications == null || conceptMedicationFormMap == null || conceptMedicationGenericStrengths == null) { return null; } //sort by primary key to get an order that works for comparing Collections.sort(conceptMedicationGenericStrengths, (o1, o2) -> ((Integer) o1.getId()).compareTo(o2.getId())); //compare all of the medications for (IMedication medication : conceptMedications) { List<IMedicationGenericStrength> medicationGenericStrengths = medication .getMedicationGenericStrengths(); Collections.sort(medicationGenericStrengths, (o1, o2) -> ((Integer) o1.getId()).compareTo(o2.getId())); if (medicationGenericStrengths.equals(conceptMedicationGenericStrengths) && medication.getName().equals(brandName) && medication.getConceptMedicationForm() != null && medication.getConceptMedicationForm().getName().equals(form)) { return null; } } ConceptMedication conceptMedication = new ConceptMedication(); conceptMedication.setName(brandName); conceptMedication.setConceptMedicationForm( Ebean.getReference(ConceptMedicationForm.class, conceptMedicationFormMap.get(form))); conceptMedicationGenericStrengths.removeIf(Objects::isNull); conceptMedication.setMedicationGenericStrengths(conceptMedicationGenericStrengths); conceptMedication.setIsDeleted(false); if (conceptMedication.getMedicationGenericStrengths().size() > 0) conceptMedication.setMedicationGenericStrengths(conceptMedicationGenericStrengths); else conceptMedication = null; return conceptMedication; }
From source file:com.oneops.cms.dj.service.CmsDpmtProcessor.java
private void completeDeployment(CmsDeployment dpmt) { dpmtMapper.completeDeployment(dpmt); CmsRelease bomRelease = rfcProcessor.getReleaseById(dpmt.getReleaseId()); CmsRelease manifestRelease = rfcProcessor.getReleaseById(bomRelease.getParentReleaseId()); List<CmsCI> platforms = cmProcessor.getCiBy3NsLike(manifestRelease.getNsPath(), MANIFEST_PLATFORM_CLASS, null);/*from www . ja v a 2 s . c o m*/ for (CmsCI plat : platforms) { boolean vacuumAllowed = true; List<CmsCI> monitorCiList = new ArrayList<>(); Set<Long> monitors4DeletedComponents = new HashSet<>(); List<CmsCIRelation> platformCloudRels = cmProcessor.getFromCIRelationsNaked(plat.getCiId(), "base.Consumes", "account.Cloud"); for (CmsCIRelation platformCloudRel : platformCloudRels) { if (platformCloudRel.getAttribute("adminstatus") != null && !CmsConstants.CLOUD_STATE_ACTIVE .equals(platformCloudRel.getAttribute("adminstatus").getDjValue())) { String platBomNs = plat.getNsPath().replace("/manifest/", "/bom/"); List<CmsCIRelation> deployedToRels = cmProcessor.getToCIRelationsByNsNaked( platformCloudRel.getToCiId(), "base.DeployedTo", null, null, platBomNs); if (deployedToRels.size() > 0) { vacuumAllowed = false; break; } } else { List<CmsCI> componentsToDelet = cmProcessor.getCiByNsLikeByStateNaked(plat.getNsPath(), null, "pending_deletion"); for (CmsCI component : componentsToDelet) { long ciId = component.getCiId(); if (CmsConstants.MONITOR_CLASS.equals(component.getCiClassName())) { monitorCiList.add(component); continue; } List<CmsCIRelation> realizedAsRels = cmProcessor.getFromCIRelationsNakedNoAttrs(ciId, "base.RealizedAs", null, null); if (realizedAsRels.size() > 0) { vacuumAllowed = false; break; } List<CmsCIRelation> monitorRels = cmProcessor.getFromCIRelationsNakedNoAttrs(ciId, CmsConstants.MANIFEST_WATCHED_BY, null, CmsConstants.MONITOR_CLASS); if (monitorRels.size() > 0) { monitors4DeletedComponents.addAll(monitorRels.stream() .map(CmsCIRelationBasic::getToCiId).collect(Collectors.toList())); } } if (!vacuumAllowed) { break; } } } if (vacuumAllowed) { //if there are monitors to be deleted, then make sure it satisfies one of these two // 1. the monitors have corresponding parent CIs that are also marked pending_deletion, these would be in monitors4DeletedComponents // 2. all the bom CIs for this manifest are updated for this manifest release monitorCiList.removeIf(monitor -> monitors4DeletedComponents.contains(monitor.getCiId())); List<CmsCI> monitorsEligible4Del = getMonitorsEligible4Del(monitorCiList); if (monitorsEligible4Del.size() == monitorCiList.size()) { nsMapper.vacuumNamespace(plat.getNsId(), dpmt.getCreatedBy()); } else { monitorsEligible4Del .forEach(monitor -> cmProcessor.deleteCI(monitor.getCiId(), dpmt.getCreatedBy())); } } } deleteGlobalVars(manifestRelease.getNsPath(), dpmt.getCreatedBy()); }
From source file:femr.util.startup.MedicationDatabaseSeeder.java
private void seedConceptMedicationGenerics() { List<? extends IMedicationGeneric> conceptMedicationGenerics = conceptMedicationGenericRepository .findAll(ConceptMedicationGeneric.class); List<ConceptMedicationGeneric> newConceptMedicationGenerics = new ArrayList<>(); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "acetaminophen")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "acetic acid")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "albendazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "albuterol")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "amlodipine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "amoxicillin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ampicillin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "aspirin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "atenolol")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "azithromycin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "bacitracin")); newConceptMedicationGenerics//from w w w.j a va 2 s . com .add(addConceptMedicationGeneric(conceptMedicationGenerics, "bacitracin/neomycin/polymyxin b")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "bisacodyl")); newConceptMedicationGenerics .add(addConceptMedicationGeneric(conceptMedicationGenerics, "bismuth subsalicylate")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "budesonide")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "calamine")); newConceptMedicationGenerics .add(addConceptMedicationGeneric(conceptMedicationGenerics, "calcium cargonate")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "cefdinir")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "cefprozil")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ceftriaxone")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "cephalexin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "clarithromycin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "clavulanic acid")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "clotrimazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "diltiazem")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "diphenhydramine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "docusate")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "doxycycline")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "econazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "electrolytes")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "famotidine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "fluconazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "folic acid")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "glipizide")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "glycerin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "guaifenesin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "hydrocortisone")); newConceptMedicationGenerics .add(addConceptMedicationGeneric(conceptMedicationGenerics, "hydroxychloroquine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ibuprofen")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ivermectin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "levofloxacin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "loperamide")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "loratadine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "menthol")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "metformin")); newConceptMedicationGenerics .add(addConceptMedicationGeneric(conceptMedicationGenerics, "methylsalicylate")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "metoclopramide")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "metoprolol")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "metronidazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "montelukast")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "naproxen")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "nitrofurantoin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "omeprazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ondansetron")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "permethrin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "prednisolone")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "prednisone")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "promethazine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "ranitidine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "sennosides")); newConceptMedicationGenerics .add(addConceptMedicationGeneric(conceptMedicationGenerics, "sulfamethoxazole")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "terazosin")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "terbinafine")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "trimethoprim")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "valacyclovir")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "a liquid")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "zafirlukast")); newConceptMedicationGenerics.add(addConceptMedicationGeneric(conceptMedicationGenerics, "zinc")); newConceptMedicationGenerics.removeIf(Objects::isNull);//remove the null stragglers cause eBean don't like em if (newConceptMedicationGenerics.size() > 0) conceptMedicationGenericRepository.createAll(newConceptMedicationGenerics); }
From source file:femr.util.startup.MedicationDatabaseSeeder.java
/** * Seed the concept dictionary for ConceptMedicationGenericStrengths. A Generic Name must already exist from seedConceptMedicationGenerics() * or you will get an error./* w w w.j a v a 2 s .com*/ * * Contains: * medication unit (mg, %, mcg, etc) * medication generic (acetaminophen, amoxicillin, etc) * isDenominator (mL = true) * value (500.0. 325.0, 0.83 etc) */ private void seedConceptMedicationGenericStrengths() { List<? extends IMedicationGenericStrength> conceptMedicationGenericStrengths = conceptMedicationGenericStrengthRepository .findAll(ConceptMedicationGenericStrength.class); Map<String, Integer> conceptMedicationUnitMap = getAvailableConceptMedicationUnits(); Map<String, Integer> conceptMedicationGenericMap = getAvailableConceptMedicationGenerics(); List<ConceptMedicationGenericStrength> newConceptMedicationGenericStrengths = new ArrayList<>(); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "acetaminophen", "mg", 160.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "acetaminophen", "mg", 325.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "acetaminophen", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "acetic acid", "%", 2.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "albendazole", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "albendazole", "mg", 400.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "albuterol", "%", 0.083)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "albuterol", "mcg", 90.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "amlodipine", "mg", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "amoxicillin", "mg", 125.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "amoxicillin", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "amoxicillin", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "amoxicillin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ampicillin", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "aspirin", "mg", 325.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "aspirin", "mg", 81.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "atenolol", "mg", 50.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "azithromycin", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "azithromycin", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "azithromycin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "bacitracin", "g", 0.9)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "bacitracin", "g", 28.0)); newConceptMedicationGenericStrengths .add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "bacitracin/neomycin/polymyxin b", "mg", 9.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "bisacodyl", "mg", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "bismuth subsalicylate", "mg", 262.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "budesonide", "mcg", 180.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "calamine", "%", 8.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "calcium cargonate", "mg", 1000.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "calcium cargonate", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "calcium cargonate", "mg", 750.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "cefdinir", "mg", 125.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "cefprozil", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ceftriaxone", "g", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ceftriaxone", "g", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "cephalexin", "mg", 125.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "cephalexin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "clarithromycin", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "clarithromycin", "mg", 300.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "clarithromycin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "clavulanic acid", "mg", 28.5)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "clotrimazole", "%", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "diltiazem", "mg", 180.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "diltiazem", "mg", 240.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "diphenhydramine", "mg", 12.5)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "diphenhydramine", "mg", 25.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "docusate", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "docusate", "mg", 50.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "doxycycline", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "doxycycline", "mg", 150.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "doxycycline", "mg", 75.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "econazole", "mg", 85.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "electrolytes", "oz", 16.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "famotidine", "mg", 20.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "fluconazole", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "folic acid", "mg", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "glipizide", "mg", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "glycerin", "%", 50.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "guaifenesin", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "guaifenesin", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "guaifenesin", "mg", 400.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "hydrocortisone", "%", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "hydrocortisone", "%", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "hydroxychloroquine", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ibuprofen", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ibuprofen", "mg", 200.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ivermectin", "mg", 6.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "levofloxacin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "loperamide", "mg", 2.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "loratadine", "mg", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "loratadine", "mg", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "menthol", "%", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "metformin", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "methylsalicylate", "%", 15.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "metoclopramide", "mg", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "metoprolol", "mg", 50.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "metronidazole", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "metronidazole", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "montelukast", "mg", 4.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "montelukast", "mg", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "naproxen", "mg", 220.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "naproxen", "mg", 500.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "nitrofurantoin", "mg", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "omeprazole", "mg", 20.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ondansetron", "mg", 4.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ondansetron", "mg", 8.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "permethrin", "%", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "permethrin", "%", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "prednisolone", "mg", 15.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "prednisone", "mg", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "promethazine", "mg", 50.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "ranitidine", "mg", 150.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "sennosides", "mg", 8.6)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "sulfamethoxazole", "mg", 160.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "sulfamethoxazole", "mg", 80.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "terazosin", "mg", 2.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "terbinafine", "mg", 250.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "trimethoprim", "mg", 400.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "trimethoprim", "mg", 800.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "valacyclovir", "g", 1.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "a liquid", "mL", 10.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "a liquid", "mL", 100.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "a liquid", "mL", 5.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "zafirlukast", "mg", 20.0)); newConceptMedicationGenericStrengths.add(addMedicationGenericStrength(conceptMedicationGenericStrengths, conceptMedicationUnitMap, conceptMedicationGenericMap, "zinc", "mg", 220.0)); newConceptMedicationGenericStrengths.removeIf(Objects::isNull);//remove the null stragglers cause eBean don't like em if (newConceptMedicationGenericStrengths.size() > 0) conceptMedicationGenericStrengthRepository.createAll(newConceptMedicationGenericStrengths); }
From source file:femr.util.startup.MedicationDatabaseSeeder.java
private void seedConceptMedications() { List<? extends IMedication> conceptMedications = conceptMedicationRepository .findAll(ConceptMedication.class); Map<String, Integer> conceptMedicationFormMap = getAvailableConceptMedicationForms(); List<? extends IMedicationGenericStrength> conceptMedicationGenericStrengths = conceptMedicationGenericStrengthRepository .findAll(ConceptMedicationGenericStrength.class); List<IMedicationGenericStrength> conceptMedicationGenericStrengthsToAdd; List<ConceptMedication> newConceptMedications = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "acetaminophen", 325.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tylenol", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "acetaminophen", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tylenol", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "albendazole", 200.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Albenza", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "albendazole", 400.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Albenza", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "albuterol", 0.083, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Proventil", "nebs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "albuterol", 90.0, "mcg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Proventil", "MDI")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amlodipine", 5.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Norvasc", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amoxicillin", 125.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Amoxil", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amoxicillin", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Amoxil", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amoxicillin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Amoxil", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ampicillin", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Principen", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "aspirin", 325.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, " ", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "aspirin", 81.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, " ", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "atenolol", 50.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tenormin", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "azithromycin", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zithromax", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "azithromycin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zithromax", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "bacitracin", 0.9, "g")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Bacitracin", "ung")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "bacitracin", 28.0, "g")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Bacitracin", "ung")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "bacitracin/neomycin/polymyxin b", 9.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Triple Antibiotic", "ung")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "bisacodyl", 5.0, "g")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Dulcolax", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "bismuth subsalicylate", 262.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Pepto Bismol", "tab chew")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "budesonide", 180.0, "mcg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Pulmicort", "MDI")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "calamine", 8.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Calamine", "lotion")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "calcium cargonate", 1000.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tums", "tab chew")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "calcium cargonate", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tums", "tab chew")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "calcium cargonate", 750.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tums", "tab chew")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "cefprozil", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Cefzil", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ceftriaxone", 1.0, "g")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Rocephin", "inj")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "cephalexin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Keflex", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "clarithromycin", 300.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Biaxin", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "clarithromycin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Biaxin", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "clotrimazole", 1.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Lotrimin", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "diltiazem", 180.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tiazac", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "diltiazem", 240.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tiazac", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "diphenhydramine", 25.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Benadryl", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "docusate", 100.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Colace", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "doxycycline", 100.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, " ", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "doxycycline", 150.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Adoxa", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "doxycycline", 75.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, " ", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "econazole", 85.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Spectazole", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "electrolytes", 16.0, "oz")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Pedialyte", "soln")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "famotidine", 20.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Pepcid", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "fluconazole", 100.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Diflucan", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "folic acid", 1.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, " ", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "glipizide", 10.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Glucotrol", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "glycerin", 50.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Sani-Supp", "PR")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "guaifenesin", 200.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Mucinex", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "guaifenesin", 400.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Mucinex", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "hydrocortisone", 1.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Cortaid", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "hydroxychloroquine", 200.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Plaquenil", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ibuprofen", 200.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Advil", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ivermectin", 6.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Stromectol", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "levofloxacin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Levaquin", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "loperamide", 2.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Imodium", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "loratadine", 10.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Claritin", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "metformin", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Glucophage", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "metoclopramide", 5.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Metozolv ODT", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "metoprolol", 50.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Lopressor", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "metronidazole", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Flagyl", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "metronidazole", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Flagyl", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "montelukast", 4.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Singulair", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "montelukast", 5.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Singulair", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "naproxen", 220.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Aleve", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "naproxen", 500.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Aleve", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "nitrofurantoin", 100.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Furadantin", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "omeprazole", 20.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zegerid", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ondansetron", 4.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zofran", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ondansetron", 8.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zofran", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "permethrin", 1.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Elimite", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "permethrin", 5.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Acticin", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "prednisone", 10.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Rayos", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "promethazine", 50.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Phenergan", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ranitidine", 150.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zantac", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "terazosin", 2.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Hytrin", "caps")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "terbinafine", 250.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Lamisil", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "valacyclovir", 1.0, "g")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Valtrex", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "zafirlukast", 20.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Accolate", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "zinc", 220.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zincfant", "tabs")); //start concept medications with multiple generics conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "diphenhydramine", 12.5, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Benadryl", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "loratadine", 5.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Claritin", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "acetaminophen", 160.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Tylenol", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ibuprofen", 100.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Advil", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amoxicillin", 125.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Amoxil", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "amoxicillin", 200.0, "mg")); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "clavulanic acid", 28.5, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Augmentin", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ampicillin", 250.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Principen", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "azithromycin", 200.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Zithromax", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "cefdinir", 125.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Omnicef", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "clarithromycin", 250.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Biaxin", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "trimethoprim", 400.0, "mg")); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "sulfamethoxazole", 80.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Bactrim", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "trimethoprim", 800.0, "mg")); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "sulfamethoxazole", 160.0, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Bactrim", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "docusate", 50.0, "mg")); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "sennosides", 8.6, "mg")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Senokot", "tabs")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "menthol", 10.0, "%")); conceptMedicationGenericStrengthsToAdd.add(getConceptMedicationGenericStrength( conceptMedicationGenericStrengths, "methylsalicylate", 15.0, "%")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Bengay", "crm")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "ceftriaxone", 10.0, "g")); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 100.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Rocephin", "inj")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "guaifenesin", 100.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Mucinex", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "hydrocortisone", 1.0, "%")); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "acetic acid", 2.0, "%")); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 10.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Vosol HC", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "cephalexin", 125.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Keflex", "susp")); conceptMedicationGenericStrengthsToAdd = new ArrayList<>(); conceptMedicationGenericStrengthsToAdd.add( getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "prednisolone", 15.0, "mg")); conceptMedicationGenericStrengthsToAdd .add(getConceptMedicationGenericStrength(conceptMedicationGenericStrengths, "a liquid", 5.0, "mL")); newConceptMedications.add(addConceptMedication(conceptMedications, conceptMedicationFormMap, conceptMedicationGenericStrengthsToAdd, "Prednisolone", "inj")); newConceptMedications.removeIf(Objects::isNull); if (newConceptMedications.size() > 0) conceptMedicationRepository.createAll(newConceptMedications); }