大约在分娩前几个月,尤其是最后的几周,宫缩就已经开始了。有些人刚开始时还没感觉,只有用手去摸肚子时,才会感受到宫缩,而且孕妈妈会感觉宫缩频率越来越高。这种宫缩无规律性,了无周期性,也不会有疼痛感。
专家表示,一般计算宫缩时,如果每小时宫缩次数在10次左右就属于比较频繁的,应及时去医院,在医生指导下服用一些抑制宫缩的药物,以预防早产的发生。如果宫缩次数不是很频繁,没有腹痛,注意休息就可以了,切记不要自行用药。
阵痛是什么感觉?
阵痛是有规律性的,这个也是因人而异,你可能对疼痛会有不一样的感觉,有的人会感觉到全身疼痛,有的人会感到拉伸的疼痛,有的人则会压迫的疼痛,那是因为不同的原因导致的疼痛感。
造成阵痛的原因:
1、全身疼痛:由于胎儿挤压使子宫收缩,让全身都感觉疼痛。
2、拉伸的疼痛:胎儿要出生的时候子宫肌肉、阴道和会阴处等软产道被拉伸,能够感觉组织和皮肤被拉伸的疼痛。
3、压迫的疼痛:骨盆的神经被胎儿的头压迫着。腰、臀部、脚后跟都非常疼。
阵痛的感觉
1、肚子疼痛
产妇要了解产生阵痛的原因,就会理解阵痛的时候不仅仅会感觉到腹部的疼痛。阵痛是由于子宫收缩引起,因此连带腰部、臀部、脚后跟都会有被拉伸的感觉,子宫口和阴道也会非常疼。
2、肌肉紧痛
随着阵痛全身会感觉到越来越疼,因此要尽量放松自己的身体。
阵痛是有规律的
开始时:肚子有一种缓慢、迟钝的疼痛,腰部感觉有不规则的疼痛
变化中:疼痛的间隔变短了,疼痛也随着变强
规律化:逐渐你会发现阵痛慢慢地变得有规律了。每隔10分钟,阵痛时间会延长30秒,阵痛会变得越来越强
那么,分别了解了以上宫缩跟阵痛的感觉后,你是不是对宫缩跟阵痛有了更深的了解呢?下面我们来对比下他俩的区别与联系。
宫缩感觉与阵痛感觉的区别
阵痛是由宫缩引起的,是要生了的表现,而宫缩有生之前的宫缩,也有假性宫缩,晚上疼早上就会减轻或者消失,不会像阵痛那样越来越强烈。
宫缩感觉与阵痛感觉的联系
当你到了预产期,只有伴有阵痛的宫缩,才是分娩的先兆。
当宫缩引起你轻微的阵痛,一会儿过去了,渐渐阵痛有所加强,间隔缩短,阵痛时间延长。宫缩像浪潮一样涌来,阵阵疼痛向下腹扩散,或有腰酸下附排便感,这种宫缩是为宝宝出生作准备。所以这点阵痛算不了什么,只要和医生合作,利用你练习过的呼吸操配合宫缩,就能顺利度过分娩关。
Thursday, January 29, 2015
Tuesday, January 27, 2015
Axapta 2012 import budget data from CSV
Below example is import budget data.
The import csv file as below :-
The import budget dialog as below :-
The result after imported as below :-
Below is the code to complete the import process :-
1. Create an EDT TECBudgetCode and extend from BudgetCode
2. Create a class named ImportBudget
3. Extend RunBase
4. Amend the code below in classDeclaration :-
public class ImportBudget extends RunBase
{
DialogField _dfFilePath, _dfBudgetCode, _dfBudgetModel, _dfCompany, _dfDate;
TransDate _defaultDate;
BudgetCode _budgetCode;
BudgetModelId _budgetModelId;
SelectableDataArea _company;
Str _filePath;
FormDateControl _codeControl, _modelControl, _dateControl;
}
10. Done!!!
The import csv file as below :-
The result after imported as below :-
Below is the code to complete the import process :-
1. Create an EDT TECBudgetCode and extend from BudgetCode
2. Create a class named ImportBudget
3. Extend RunBase
4. Amend the code below in classDeclaration :-
public class ImportBudget extends RunBase
{
DialogField _dfFilePath, _dfBudgetCode, _dfBudgetModel, _dfCompany, _dfDate;
TransDate _defaultDate;
BudgetCode _budgetCode;
BudgetModelId _budgetModelId;
SelectableDataArea _company;
Str _filePath;
FormDateControl _codeControl, _modelControl, _dateControl;
}
5. Create method Dialog as below :-
protected Object Dialog()
{
Dialog dialog;
DialogGroup parameterGp, fileGp;
;
dialog = super();
dialog.caption("Upload Budget");
parameterGp = dialog.addGroup("Parameters"); //group up the fields below
_dfBudgetCode = dialog.addField(extendedTypeStr(TECBudgetCode));
_codeControl = _dfBudgetCode.control();
_codeControl.mandatory(true); //set mandatory
_dfBudgetModel = dialog.addField(extendedTypeStr(BudgetModelId));
_modelControl = _dfBudgetModel.control();
_modelControl.mandatory(true);
_dfCompany = dialog.addField(extendedTypeStr(SelectableDataArea));
_dfCompany.value(curext()); //set default value
_dfDate = dialog.addField(extendedTypeStr(TransDate));
_dateControl = _dfDate.control();
_dateControl.mandatory(true);
fileGp = dialog.addGroup("File");
_dfFilePath = dialog.addField(extendedTypeStr(FilenameOpen),"Select file","Select file to import");
dialog.filenameLookupFilter(['csv','*.csv']);
return dialog;
}
6. Create a new boolean method named getFromDialog() to get the value :-
public boolean getFromDialog()
{
_defaultDate = _dfDate.value();
_company = _dfCompany.value();
_budgetModelId = _dfBudgetModel.value();
_budgetCode = _dfBudgetCode.value();
_filePath = _dfFilePath.value();
return super();
}
7. Create method Run as below :-
public void run()
{
AsciiIo importFile;
str filePath,fileNameOnly;
filetype type;
container record;
str Delimiter = ",";
int totalRecords;
RecId budgetCodeRecId;
BudgetTransactionType budgetTransactionType;
BudgetTransactionHeader budgetTransHeader;
boolean ret;
Date CustomDate;
Int month_number;
Int years_numbers;
Int day_number;
Int numofMonth;
;
//get the file value
[filePath, fileNameOnly, type] = fileNameSplit(_filePath);
importFile = new AsciiIo(_filePath, 'R');
if((!importFile) || (importFile.status() != IO_Status::Ok))
{
warning("@SYS52676");
throw(Exception::Error);
}
importFile.inFieldDelimiter(Delimiter);
if((!importFile) || (importFile.status() != IO_Status::Ok))
{
warning("@SYS52676");
throw(Exception::Error);
}
try
{
ttsbegin;
// check the number sequence setup in budget parameter
ret = BudgetTransactionManager::checkBudgetTransactionNumberSequence();
if(ret)
{
budgetCodeRecId = BudgetTransactionCode::findByBudgetTransactionCode(_budgetCode).RecId;
budgetTransactionType = BudgetTransactionCode::findByBudgetTransactionCode(_budgetCode).BudgetTransactionType;
budgetTransHeader.initValue();
//get number seq value
BudgetTransHeader.TransactionNumber = NumberSeq::newGetNum(BudgetParameters::numRefBudgetTransactionId()).num();
budgetTransHeader.BudgetModelDataAreaId = _company;
budgetTransHeader.BudgetModelId = _budgetModelId;
budgetTransHeader.BudgetTransactionCode = budgetCodeRecId;
budgetTransHeader.BudgetTransactionType = budgetTransactionType;
budgetTransHeader.Date = _defaultDate;
budgetTransHeader.insert();
}
years_numbers = year(_defaultDate);
day_number = 1;
record = importFile.read();
while(importFile.status() == IO_Status::Ok)
{
// budget amount start from January [conpeek(recrod,5)]
numofMonth = 5;
record = importFile.read();
if(!record)
break;
//5 = Jan , 16 = Dec
while(numofMonth <= 16)
{
customDate =mkdate(day_number, numofMonth - 4, years_numbers);
totalRecords = totalRecords + 1;
this.createBudgetTransactionLine(budgetTransHeader, record, numOfMonth, customDate, totalRecords);
numofMonth++;
}
}
ttscommit;
info(strFmt("@TEC88", totalRecords));
}
catch(Exception::Error)
{
Throw(Exception::Error);
}
}
8. Create a method named CreateBudgetTransactionLine for generate line data :-
private void createBudgetTransactionLine(BudgetTransactionHeader _budgetTransHeader, container _record, int _numOfMonth, date _customDate, int _lineNumber)
{
BudgetTransactionLine budgetTransLine;
Name accountStructureName;
DimensionHierarchy accountStructure;
;
ttsBegin;
budgetTransLine.clear();
budgetTransLine.initFromBudgetTransactionHeader(_budgetTransHeader);
accountStructureName = conPeek(_record,1);
//get the accountsturcture
accountStructure = DimensionHierarchy::find(DimensionAttributeValueCombination::find(DMFDimensionHelper::generateDynamicDimension(conPeek(_record,2))).AccountStructure);
if(accountStructure.Name != accountStructureName)
{
throw error(strFmt("@DMF1586",accountStructure.Name,accountStructureName));
}
//get the financial dimension to recid
budgetTransLine.LedgerDimension = DMFDimensionHelper::generateDynamicDimension(conPeek(_record,2));
budgetTransLine.TransactionCurrency = conPeek(_record,3);
budgetTransLine.BudgetType = conPeek(_record,4);
budgetTransLine.TransactionCurrencyAmount = decRound(conPeek(_record, _numofMonth),2);
budgetTransLine.Date = _customDate;
budgetTransLine.AccountingCurrencyAmount = decRound(conPeek(_record,_numofMonth),2);
budgetTransLine.LineNumber = _lineNumber;
budgetTransLine.insert();
budgetTransLine.clear();
ttsCommit;
}
9. Create a main method:-
public static void main(Args _args)
{
ImportBudget budgetCreate = new ImportBudget();
if (budgetCreate.prompt())
{
budgetCreate.run();
}
}
7. Create method Run as below :-
public void run()
{
AsciiIo importFile;
str filePath,fileNameOnly;
filetype type;
container record;
str Delimiter = ",";
int totalRecords;
RecId budgetCodeRecId;
BudgetTransactionType budgetTransactionType;
BudgetTransactionHeader budgetTransHeader;
boolean ret;
Date CustomDate;
Int month_number;
Int years_numbers;
Int day_number;
Int numofMonth;
;
//get the file value
[filePath, fileNameOnly, type] = fileNameSplit(_filePath);
importFile = new AsciiIo(_filePath, 'R');
if((!importFile) || (importFile.status() != IO_Status::Ok))
{
warning("@SYS52676");
throw(Exception::Error);
}
importFile.inFieldDelimiter(Delimiter);
if((!importFile) || (importFile.status() != IO_Status::Ok))
{
warning("@SYS52676");
throw(Exception::Error);
}
try
{
ttsbegin;
// check the number sequence setup in budget parameter
ret = BudgetTransactionManager::checkBudgetTransactionNumberSequence();
if(ret)
{
budgetCodeRecId = BudgetTransactionCode::findByBudgetTransactionCode(_budgetCode).RecId;
budgetTransactionType = BudgetTransactionCode::findByBudgetTransactionCode(_budgetCode).BudgetTransactionType;
budgetTransHeader.initValue();
//get number seq value
BudgetTransHeader.TransactionNumber = NumberSeq::newGetNum(BudgetParameters::numRefBudgetTransactionId()).num();
budgetTransHeader.BudgetModelDataAreaId = _company;
budgetTransHeader.BudgetModelId = _budgetModelId;
budgetTransHeader.BudgetTransactionCode = budgetCodeRecId;
budgetTransHeader.BudgetTransactionType = budgetTransactionType;
budgetTransHeader.Date = _defaultDate;
budgetTransHeader.insert();
}
years_numbers = year(_defaultDate);
day_number = 1;
record = importFile.read();
while(importFile.status() == IO_Status::Ok)
{
// budget amount start from January [conpeek(recrod,5)]
numofMonth = 5;
record = importFile.read();
if(!record)
break;
//5 = Jan , 16 = Dec
while(numofMonth <= 16)
{
customDate =mkdate(day_number, numofMonth - 4, years_numbers);
totalRecords = totalRecords + 1;
this.createBudgetTransactionLine(budgetTransHeader, record, numOfMonth, customDate, totalRecords);
numofMonth++;
}
}
ttscommit;
info(strFmt("@TEC88", totalRecords));
}
catch(Exception::Error)
{
Throw(Exception::Error);
}
}
8. Create a method named CreateBudgetTransactionLine for generate line data :-
private void createBudgetTransactionLine(BudgetTransactionHeader _budgetTransHeader, container _record, int _numOfMonth, date _customDate, int _lineNumber)
{
BudgetTransactionLine budgetTransLine;
Name accountStructureName;
DimensionHierarchy accountStructure;
;
ttsBegin;
budgetTransLine.clear();
budgetTransLine.initFromBudgetTransactionHeader(_budgetTransHeader);
accountStructureName = conPeek(_record,1);
//get the accountsturcture
accountStructure = DimensionHierarchy::find(DimensionAttributeValueCombination::find(DMFDimensionHelper::generateDynamicDimension(conPeek(_record,2))).AccountStructure);
if(accountStructure.Name != accountStructureName)
{
throw error(strFmt("@DMF1586",accountStructure.Name,accountStructureName));
}
//get the financial dimension to recid
budgetTransLine.LedgerDimension = DMFDimensionHelper::generateDynamicDimension(conPeek(_record,2));
budgetTransLine.TransactionCurrency = conPeek(_record,3);
budgetTransLine.BudgetType = conPeek(_record,4);
budgetTransLine.TransactionCurrencyAmount = decRound(conPeek(_record, _numofMonth),2);
budgetTransLine.Date = _customDate;
budgetTransLine.AccountingCurrencyAmount = decRound(conPeek(_record,_numofMonth),2);
budgetTransLine.LineNumber = _lineNumber;
budgetTransLine.insert();
budgetTransLine.clear();
ttsCommit;
}
9. Create a main method:-
public static void main(Args _args)
{
ImportBudget budgetCreate = new ImportBudget();
if (budgetCreate.prompt())
{
budgetCreate.run();
}
}
10. Done!!!
Axpata 2012 Convert financial dimension from value to recId
The code to get Financial dimension recid Id :-
Str dimension = "DAT-001-0003";
;
budgetTransLine.LedgerDimension = DMFDimensionHelper::generateDynamicDimension(dimension);
Str dimension = "DAT-001-0003";
;
budgetTransLine.LedgerDimension = DMFDimensionHelper::generateDynamicDimension(dimension);
Subscribe to:
Comments (Atom)
