/** * Gets the first repetition for <b>dosage</b> (Details of how medication was taken), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Indicates how the medication is/was used by the patient * </p> */ public Dosage getDosageFirstRep() { if (getDosage().isEmpty()) { return addDosage(); } return getDosage().get(0); }
/** * Gets the first repetition for <b>identifier</b> (External Identifier), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. * </p> */ public IdentifierDt getIdentifierFirstRep() { if (getIdentifier().isEmpty()) { return addIdentifier(); } return getIdentifier().get(0); } /**
/** * Gets the first repetition for <b>reasonNotGiven</b> (True if asserting medication was not given), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A code indicating why the medication was not taken. * </p> */ public CodeableConceptDt getReasonNotGivenFirstRep() { if (getReasonNotGiven().isEmpty()) { return addReasonNotGiven(); } return getReasonNotGiven().get(0); }
@Override public String getName() { if(myMedicationStatement != null){ Medication m = (Medication) myMedicationStatement.getMedication().getResource(); if(m != null){ return "Medication Statement: " + m.getName().getValue(); } return "Medication Statement: " + myMedicationStatement.getId().getValueAsString(); //if we don't have a medication name, use the id as the name } return null; }
@Override public IdentifierDt getIdentifier() { if(myMedicationStatement != null){ return myMedicationStatement.getIdentifierFirstRep(); } return null; }
/** * Adds and returns a new value for <b>device</b> (E.g. infusion pump) * * <p> * <b>Definition:</b> * An identifier or a link to a resource that identifies a device used in administering the medication to the patient. * </p> */ public ResourceReferenceDt addDevice() { ResourceReferenceDt newType = new ResourceReferenceDt(); getDevice().add(newType); return newType; }
/** * Adds and returns a new value for <b>dosage</b> (Details of how medication was taken) * * <p> * <b>Definition:</b> * Indicates how the medication is/was used by the patient * </p> */ public Dosage addDosage() { Dosage newType = new Dosage(); getDosage().add(newType); return newType; }
/** * Adds and returns a new value for <b>reasonNotGiven</b> (True if asserting medication was not given) * * <p> * <b>Definition:</b> * A code indicating why the medication was not taken. * </p> */ public CodeableConceptDt addReasonNotGiven() { CodeableConceptDt newType = new CodeableConceptDt(); getReasonNotGiven().add(newType); return newType; }
/** * Adds and returns a new value for <b>identifier</b> (External Identifier) * * <p> * <b>Definition:</b> * External identifier - FHIR will generate its own internal IDs (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. * </p> */ public IdentifierDt addIdentifier() { IdentifierDt newType = new IdentifierDt(); getIdentifier().add(newType); return newType; }