7 #include <fwTools/UUID.hpp> 9 #include <fwAtoms/Object.hpp> 10 #include <fwAtoms/Object.hxx> 11 #include <fwAtoms/String.hpp> 13 #include <fwAtomsPatch/helper/Object.hpp> 14 #include <fwAtomsPatch/helper/functions.hpp> 16 #include "fwMDSemanticPatch/V1/V2/fwData/Patient.hpp" 49 const ::fwAtoms::Object::sptr& previous,
50 const ::fwAtoms::Object::sptr& current,
51 ::fwAtomsPatch::IPatch::NewVersionsType& newVersions)
53 ISemanticPatch::apply(previous, current, newVersions);
54 ::fwAtomsPatch::helper::cleanFields( current );
57 ::fwAtoms::String::sptr uid = current->getAttribute<
::fwAtoms::String >(
"patient_id");
58 if( uid->getValue().empty() )
virtual FWMDSEMANTICPATCH_API void apply(const ::fwAtoms::Object::sptr &previous, const ::fwAtoms::Object::sptr ¤t,::fwAtomsPatch::IPatch::NewVersionsType &newVersions) override
Applies patch.
Contains the semantic patches within the context "MedicalData".
static FWATOMS_API String::sptr New(std::string value)
Construct a new Object represented a string.
Contains base functionalities used to transform objects from a version to another.
std::string m_originClassname
Origin classname of the object.
FWMDSEMANTICPATCH_API ~Patient()
Destructor.
virtual FWATOMSPATCH_API void addContext(const std::string &context, const std::string &originVersion, const std::string &targetVersion)
Add a context where the patch can be applied.
FWATOMSPATCH_API void replaceAttribute(const std::string &name,::fwAtoms::Base::sptr newValue, conditions::Abstract::sptr condition=conditions::Abstract::New())
Replaces an attribute.
std::string m_originVersion
Origin version of the object.
FWATOMSPATCH_API ISemanticPatch()
Constructor.
Patch a patient from version 'V1' to 'V2' within 'MedicalData' context.
FWMDSEMANTICPATCH_API Patient()
Constructor.
Contains the representation of the data objects used in the framework.
Class represented a String.