org.hl7.fhir.dstu3.model.AllergyIntolerance Java Examples
The following examples show how to use
org.hl7.fhir.dstu3.model.AllergyIntolerance.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 5 votes |
@Read() public AllergyIntolerance get(@IdParam IdType allergyId) { resourcePermissionProvider.checkPermission("read"); AllergyIntolerance allergy = allergyDao.read(ctx,allergyId); if ( allergy == null) { throw OperationOutcomeFactory.buildOperationOutcomeException( new ResourceNotFoundException("No AllergyIntolerance/ " + allergyId.getIdPart()), OperationOutcome.IssueType.NOTFOUND); } return allergy; }
Example #2
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 5 votes |
@Search public List<AllergyIntolerance> search(HttpServletRequest theRequest, @OptionalParam(name = AllergyIntolerance.SP_PATIENT) ReferenceParam patient , @OptionalParam(name = AllergyIntolerance.SP_DATE) DateRangeParam date , @OptionalParam(name = AllergyIntolerance.SP_CLINICAL_STATUS) TokenParam clinicalStatus , @OptionalParam(name = AllergyIntolerance.SP_IDENTIFIER) TokenParam identifier , @OptionalParam(name = AllergyIntolerance.SP_RES_ID) StringParam resid , @OptionalParam(name = AllergyIntolerance.SP_VERIFICATION_STATUS) TokenParam verificationStatus ) { return allergyDao.search(ctx,patient, date, clinicalStatus,identifier,resid, verificationStatus); }
Example #3
Source File: AllergyIntoleranceRepository.java From careconnect-reference-implementation with Apache License 2.0 | 5 votes |
List<AllergyIntoleranceEntity> searchEntity(FhirContext ctx, @OptionalParam(name = AllergyIntolerance.SP_PATIENT) ReferenceParam patient , @OptionalParam(name = AllergyIntolerance.SP_DATE) DateRangeParam date , @OptionalParam(name = AllergyIntolerance.SP_CLINICAL_STATUS) TokenParam clinicalStatus , @OptionalParam(name = AllergyIntolerance.SP_IDENTIFIER) TokenParam identifier , @OptionalParam(name= AllergyIntolerance.SP_RES_ID) StringParam id , @OptionalParam(name = AllergyIntolerance.SP_VERIFICATION_STATUS) TokenParam verificationStatus );
Example #4
Source File: AllergyIntoleranceRepository.java From careconnect-reference-implementation with Apache License 2.0 | 5 votes |
List<AllergyIntolerance> search( FhirContext ctx, @OptionalParam(name = AllergyIntolerance.SP_PATIENT) ReferenceParam patient , @OptionalParam(name = AllergyIntolerance.SP_DATE) DateRangeParam date , @OptionalParam(name = AllergyIntolerance.SP_CLINICAL_STATUS) TokenParam clinicalStatus , @OptionalParam(name = AllergyIntolerance.SP_IDENTIFIER) TokenParam identifier , @OptionalParam(name= AllergyIntolerance.SP_RES_ID) StringParam id , @OptionalParam(name = AllergyIntolerance.SP_VERIFICATION_STATUS) TokenParam verificationStatus );
Example #5
Source File: AllergyIntoleranceReaction.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceSeverity getSeverity() { return severity; }
Example #6
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
@Validate public MethodOutcome testResource(@ResourceParam AllergyIntolerance resource, @Validate.Mode ValidationModeEnum theMode, @Validate.Profile String theProfile) { return resourceTestProvider.testResource(resource,theMode,theProfile); }
Example #7
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam AllergyIntolerance allergy) { resourcePermissionProvider.checkPermission("create"); MethodOutcome method = new MethodOutcome(); method.setCreated(true); OperationOutcome opOutcome = new OperationOutcome(); method.setOperationOutcome(opOutcome); try { AllergyIntolerance newAllergyIntolerance = allergyDao.create(ctx,allergy, null,null); method.setId(newAllergyIntolerance.getIdElement()); method.setResource(newAllergyIntolerance); } catch (Exception ex) { ProviderResponseLibrary.handleException(method,ex); } return method; }
Example #8
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
@Update public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam AllergyIntolerance allergy, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { resourcePermissionProvider.checkPermission("update"); MethodOutcome method = new MethodOutcome(); method.setCreated(true); OperationOutcome opOutcome = new OperationOutcome(); method.setOperationOutcome(opOutcome); try { AllergyIntolerance newAllergyIntolerance = allergyDao.create(ctx,allergy, theId, theConditional); method.setId(newAllergyIntolerance.getIdElement()); method.setResource(newAllergyIntolerance); } catch (Exception ex) { ProviderResponseLibrary.handleException(method,ex); } return method; }
Example #9
Source File: AllergyIntoleranceProvider.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
@Override public Class<? extends IBaseResource> getResourceType() { return AllergyIntolerance.class; }
Example #10
Source File: AllergyIntoleranceRepository.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
AllergyIntolerance create(FhirContext ctx, AllergyIntolerance allergy, @IdParam IdType theId, @ConditionalUrlParam String theConditional) throws OperationOutcomeException;
Example #11
Source File: AllergyIntoleranceReaction.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntoleranceReaction setSeverity(AllergyIntolerance.AllergyIntoleranceSeverity severity) { this.severity = severity; return this; }
Example #12
Source File: ArgonautConverter.java From org.hl7.fhir.core with Apache License 2.0 | 4 votes |
private void processAllergiesSection(CDAUtilities cda, Convert convert, Element section, Context context) throws Exception { scanSection("Allergies", section); ListResource list = new ListResource(); list.setId(context.baseId+"-list-allergies"); list.setUserData("profile", "http://hl7.org/fhir/StructureDefinition/list-daf-dafallergylist"); list.setSubject(context.subjectRef); list.setCode(inspectCode(convert.makeCodeableConceptFromCD(cda.getChild(section, "code")), null)); list.setTitle(cda.getChild(section, "title").getTextContent()); list.setStatus(ListStatus.CURRENT); list.setDateElement(context.now); list.setSource(context.authorRef); list.setMode(ListMode.SNAPSHOT); buildNarrative(list, cda.getChild(section, "text")); int i = 0; for (Element c : cda.getChildren(section, "entry")) { Element apa = cda.getChild(c, "act"); // allergy problem act AllergyIntolerance ai = new AllergyIntolerance(); ai.setId(context.baseId+"-allergy-"+Integer.toString(i)); ai.setUserData("profile", "http://hl7.org/fhir/StructureDefinition/allergyintolerance-daf-dafallergyintolerance"); i++; ai.setPatient(context.subjectRef); ai.setAssertedDateElement(convert.makeDateTimeFromTS(cda.getChild(cda.getChild(apa, "effectiveTime"), "low"))); boolean found = false; for (Element e : cda.getChildren(apa, "id")) { Identifier id = convert.makeIdentifierFromII(e); ai.getIdentifier().add(id); } if (!found) { list.addEntry().setItem(new Reference().setReference("AllergyIntolerance/"+ai.getId())); Element ao = cda.getChild(cda.getChild(apa, "entryRelationship"), "observation"); // allergy observation if (!cda.getChild(ao, "value").getAttribute("code").equals("419511003")) throw new Error("unexpected code"); // nothing.... // no allergy status observation List<Element> reactions = cda.getChildren(ao, "entryRelationship"); Element pe = cda.getChild(cda.getChild(cda.getChild(ao, "participant"), "participantRole"), "playingEntity"); Element pec = cda.getChild(pe, "code"); if (pec == null || !Utilities.noString(pec.getAttribute("nullFlavor"))) { String n = cda.getChild(pe, "name").getTextContent(); // if (n.contains("No Known Drug Allergies") && reactions.isEmpty()) // ai.setSubstance(new CodeableConcept().setText(n)); // todo: what do with this? // else ai.setCode(new CodeableConcept().setText(n)); } else ai.setCode(inspectCode(convert.makeCodeableConceptFromCD(pec), null)); recordAllergyCode(ai.getCode()); if (!reactions.isEmpty()) { AllergyIntoleranceReactionComponent aie = ai.addReaction(); for (Element er : reactions) { Element ro = cda.getChild(er, "observation"); aie.addManifestation(inspectCode(convert.makeCodeableConceptFromCD(cda.getChild(ro, "value")), null)); } } saveResource(ai); } } saveResource(list); }
Example #13
Source File: AllergyIntoleranceCategory.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public void setCategory(AllergyIntolerance.AllergyIntoleranceCategory category) { this.category = category; }
Example #14
Source File: AllergyIntoleranceCategory.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceCategory getCategory() { return category; }
Example #15
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntoleranceEntity setCriticality(AllergyIntolerance.AllergyIntoleranceCriticality criticality) { this.criticality = criticality; return this; }
Example #16
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceCriticality getCriticality() { return criticality; }
Example #17
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntoleranceEntity setType(AllergyIntolerance.AllergyIntoleranceType type) { this.type = type; return this; }
Example #18
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceType getType() { return type; }
Example #19
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntoleranceEntity setVerificationStatus(AllergyIntolerance.AllergyIntoleranceVerificationStatus verificationStatus) { this.verificationStatus = verificationStatus; return this; }
Example #20
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceVerificationStatus getVerificationStatus() { return verificationStatus; }
Example #21
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntoleranceEntity setClinicalStatus(AllergyIntolerance.AllergyIntoleranceClinicalStatus clinicalStatus) { this.clinicalStatus = clinicalStatus; return this; }
Example #22
Source File: AllergyIntoleranceEntity.java From careconnect-reference-implementation with Apache License 2.0 | 4 votes |
public AllergyIntolerance.AllergyIntoleranceClinicalStatus getClinicalStatus() { return clinicalStatus; }
Example #23
Source File: AllergyIntoleranceRepository.java From careconnect-reference-implementation with Apache License 2.0 | votes |
AllergyIntolerance read(FhirContext ctx, IdType theId);